diff options
author | Jonathan Billings <jsbillin@umich.edu> | 2011-04-25 11:19:06 -0400 |
---|---|---|
committer | Jonathan Billings <jsbillin@umich.edu> | 2011-04-25 11:19:06 -0400 |
commit | b748d1a5fde80fa18913b67ae6eccf415d78fed3 (patch) | |
tree | c4303cda1ddc1c3cb3ce100c1d41a2543f703824 | |
parent | 66642f84fd71e9230245b11718bf9a7e96ba0c7f (diff) | |
download | bcfg2-b748d1a5fde80fa18913b67ae6eccf415d78fed3.tar.gz bcfg2-b748d1a5fde80fa18913b67ae6eccf415d78fed3.tar.bz2 bcfg2-b748d1a5fde80fa18913b67ae6eccf415d78fed3.zip |
Fix the bcfg2 client -r option
The man page for 'bcfg2' says to use -r 'all', 'Service' or 'Package',
but the code only responded to -r 'all', 'service' or 'package'.
Update the client to allow 'all', 'service', 'Service', 'package' and
'Package'.
-rw-r--r-- | src/lib/Client/Frame.py | 4 | ||||
-rwxr-xr-x | src/sbin/bcfg2 | 7 |
2 files changed, 8 insertions, 3 deletions
diff --git a/src/lib/Client/Frame.py b/src/lib/Client/Frame.py index f87610dcb..60d158eb1 100644 --- a/src/lib/Client/Frame.py +++ b/src/lib/Client/Frame.py @@ -200,10 +200,10 @@ class Frame: if self.setup['remove']: if self.setup['remove'] == 'all': self.removal = self.extra - elif self.setup['remove'] == 'services': + elif self.setup['remove'] in ['services', 'Services']: self.removal = [entry for entry in self.extra \ if entry.tag == 'Service'] - elif self.setup['remove'] == 'packages': + elif self.setup['remove'] in ['packages', 'Packages']: self.removal = [entry for entry in self.extra \ if entry.tag == 'Package'] diff --git a/src/sbin/bcfg2 b/src/sbin/bcfg2 index 9bc50fe65..56f98ade4 100755 --- a/src/sbin/bcfg2 +++ b/src/sbin/bcfg2 @@ -106,7 +106,12 @@ class Client: raise SystemExit(0) if self.setup['remove'] and 'services' in self.setup['remove']: self.logger.error("Service removal is nonsensical, disable services to get former behavior") - if self.setup['remove'] not in [False, 'all', 'services', 'packages']: + if self.setup['remove'] not in [False, + 'all', + 'Services', + 'Packages', + 'services', + 'packages']: self.logger.error("Got unknown argument %s for -r" % (self.setup['remove'])) if (self.setup["file"] != False) and (self.setup["cache"] != False): print("cannot use -f and -c together") |