diff options
author | Michael DeHaan <mdehaan@redhat.com> | 2008-07-03 16:30:50 -0400 |
---|---|---|
committer | Michael DeHaan <mdehaan@redhat.com> | 2008-07-03 16:30:50 -0400 |
commit | d46274075ae14e067412c9899c511d9296c71ac0 (patch) | |
tree | eac82a932d86fc9de7a8ccc3615d87823902d029 | |
parent | 4ba12094934f9281aa3a8d76434cb83b86212f69 (diff) | |
download | cobbler-d46274075ae14e067412c9899c511d9296c71ac0.tar.gz cobbler-d46274075ae14e067412c9899c511d9296c71ac0.tar.xz cobbler-d46274075ae14e067412c9899c511d9296c71ac0.zip |
Make --in-place not break --find
-rw-r--r-- | cobbler/modules/cli_distro.py | 3 | ||||
-rw-r--r-- | cobbler/modules/cli_profile.py | 3 | ||||
-rw-r--r-- | cobbler/modules/cli_repo.py | 4 | ||||
-rw-r--r-- | cobbler/modules/cli_system.py | 3 |
4 files changed, 9 insertions, 4 deletions
diff --git a/cobbler/modules/cli_distro.py b/cobbler/modules/cli_distro.py index 200fd65f..03108059 100644 --- a/cobbler/modules/cli_distro.py +++ b/cobbler/modules/cli_distro.py @@ -47,7 +47,8 @@ class DistroFunction(commands.CobblerFunction): p.add_option("--kernel", dest="kernel", help="absolute path to vmlinuz (REQUIRED)") p.add_option("--kopts", dest="kopts", help="ex: 'noipv6'") p.add_option("--ksmeta", dest="ksmeta", help="ex: 'blippy=7'") - p.add_option("--in-place", action="store_true", default=False, dest="inplace", help="edit items in kopts or ksmeta without clearing the other items") + if not self.matches_args(args,["find"]): + p.add_option("--in-place", action="store_true", default=False, dest="inplace", help="edit items in kopts or ksmeta without clearing the other items") p.add_option("--name", dest="name", help="ex: 'RHEL-5-i386' (REQUIRED)") diff --git a/cobbler/modules/cli_profile.py b/cobbler/modules/cli_profile.py index 1ae4d9a9..c538e898 100644 --- a/cobbler/modules/cli_profile.py +++ b/cobbler/modules/cli_profile.py @@ -49,7 +49,8 @@ class ProfileFunction(commands.CobblerFunction): p.add_option("--kickstart", dest="kickstart", help="absolute path to kickstart template (RECOMMENDED)") p.add_option("--ksmeta", dest="ksmeta", help="ex: 'blippy=7'") p.add_option("--kopts", dest="kopts", help="ex: 'noipv6'") - p.add_option("--in-place",action="store_true", dest="inplace", default=False, help="edit items in kopts or ksmeta without clearing the other items") + if not self.matches_args(args,["find"]): + p.add_option("--in-place",action="store_true", dest="inplace", default=False, help="edit items in kopts or ksmeta without clearing the other items") p.add_option("--name", dest="name", help="a name for the profile (REQUIRED)") diff --git a/cobbler/modules/cli_repo.py b/cobbler/modules/cli_repo.py index 65e4f713..85144f71 100644 --- a/cobbler/modules/cli_repo.py +++ b/cobbler/modules/cli_repo.py @@ -55,7 +55,9 @@ class RepoFunction(commands.CobblerFunction): p.add_option("--priority", dest="priority", help="set priority") p.add_option("--rpm-list", dest="rpm_list", help="just mirror these rpms") p.add_option("--yumopts", dest="yumopts", help="ex: pluginvar=abcd") - p.add_option("--in-place", action="store_true", default=False, dest="inplace", help="edit items in yumopts without clearing the other items") + + if not self.matches_args(args, ["find"]): + p.add_option("--in-place", action="store_true", default=False, dest="inplace", help="edit items in yumopts without clearing the other items") if self.matches_args(args,["copy","rename"]): p.add_option("--newname", dest="newname", help="used for copy/edit") diff --git a/cobbler/modules/cli_system.py b/cobbler/modules/cli_system.py index e49e9fd4..18971418 100644 --- a/cobbler/modules/cli_system.py +++ b/cobbler/modules/cli_system.py @@ -52,7 +52,8 @@ class SystemFunction(commands.CobblerFunction): p.add_option("--kopts", dest="kopts", help="ex: 'noipv6'") p.add_option("--ksmeta", dest="ksmeta", help="ex: 'blippy=7'") p.add_option("--mac", dest="mac", help="ex: 'AA:BB:CC:DD:EE:FF', (RECOMMENDED)") - p.add_option("--in-place", action="store_true", default=False, dest="inplace", help="edit items in kopts or ksmeta without clearing the other items") + if not self.matches_args(args, ["find"]): + p.add_option("--in-place", action="store_true", default=False, dest="inplace", help="edit items in kopts or ksmeta without clearing the other items") p.add_option("--name", dest="name", help="a name for the system (REQUIRED)") |