summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--man/bcfg2-admin.826
-rw-r--r--src/lib/Server/Admin/Client.py8
2 files changed, 20 insertions, 14 deletions
diff --git a/man/bcfg2-admin.8 b/man/bcfg2-admin.8
index d657f6dbf..4af010144 100644
--- a/man/bcfg2-admin.8
+++ b/man/bcfg2-admin.8
@@ -1,4 +1,4 @@
- .TH "bcfg2-admin" 8
+.TH "bcfg2-admin" 8
.SH NAME
bcfg2-admin \- Perform repository administration tasks
.SH SYNOPSIS
@@ -13,7 +13,7 @@ bcfg2-admin \- Perform repository administration tasks
Perform bcfg2 repository administration
.SH OPTIONS
.PP
-.B -C <config-file>
+.B \-C <config-file>
.RS
Specify the location of the configuration file (if it is not in /etc/bcfg2.conf)
.RE
@@ -55,25 +55,25 @@ Create a graphviz diagram of client, group and bundle information
.RE
.SH CLIENT OPTIONS
.PP
-.B \mode
+.B mode
.RS
Add a client 'add' or delete a client 'del'
.RE
-.B \client
+.B client
.RS
Specify the client's name
.RE
-.B \attribute=value
+.B attribute=value
.RS
Set attribute values when adding a new client
.RE
.SH QUERY OPTIONS
.PP
-.B \g=group
+.B g=group
.RS
Specify a group to search within
.RE
-.B \p=profile
+.B p=profile
.RS
Specify a profile to search within
.RE
@@ -91,17 +91,17 @@ Print the results, separated by commas
.RE
.SH COMPARE OPTIONS
.PP
-.B \old
+.B old
.RS
Specify the location of the old configuration file
.RE
-.B \new
+.B new
.RS
Specify the location of the new configuration file
.RE
.SH MINESTRUCT OPTIONS
.PP
-.B \client
+.B client
.RS
Client whose metadata is to be searched for extra entries
.RE
@@ -115,15 +115,15 @@ Specify the xml file in which to write the extra entries
.RE
.SH PULL OPTIONS
.PP
-.B \client
+.B client
.RS
Specify the name of the client to search for
.RE
-.B \entry-type
+.B entry-type
.RS
Specify the type of the entry to pull
.RE
-.B \entry-name
+.B entry-name
.RS
Specify the name of the entry to pull
.RE
diff --git a/src/lib/Server/Admin/Client.py b/src/lib/Server/Admin/Client.py
index 618e5b826..1cecc0e71 100644
--- a/src/lib/Server/Admin/Client.py
+++ b/src/lib/Server/Admin/Client.py
@@ -20,7 +20,13 @@ class Client(Bcfg2.Server.Admin.Mode):
def __call__(self, args):
Bcfg2.Server.Admin.Mode.__call__(self, args)
- if args[0] == 'add':
+ if len(args) == 0:
+ self.errExit("Client mode requires at least one argument: <add> or <delete>")
+ if "-h" in args:
+ print "Usage: "
+ print self.__shorthelp__
+ raise SystemExit(1)
+ if args[0] == 'add':
attr_d = {}
for i in args[2:]:
attr, val = i.split('=', 1)