backend/satellite_tools/spacewalk-remove-channel | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
New commits:
commit 13dd9aa39c6cbcd874733a97d93c5423238e30be
Author: Dimitar Yordanov <dyordano(a)redhat.com>
Date: Wed Feb 5 15:48:56 2014 +0100
870990 - sw-rm-ch -l when satellite-sync runs.
diff --git a/backend/satellite_tools/spacewalk-remove-channel
b/backend/satellite_tools/spacewalk-remove-channel
index 3ca931d..5b5380f 100755
--- a/backend/satellite_tools/spacewalk-remove-channel
+++ b/backend/satellite_tools/spacewalk-remove-channel
@@ -65,16 +65,6 @@ def main():
sys.stderr.write('ERROR: must be root to execute\n')
sys.exit(8)
- for command in ['spacewalk-remove-channel', 'satellite-sync',
- 'spacewalk-repo-sync']:
- try:
- LOCK.append(rhnLockfile.Lockfile(
- os.path.join(LOCK_DIR, "%s.pid" % command)))
- except rhnLockfile.LockfileLockedException:
- print("ERROR: An instance of %s is running, exiting." % command)
- sys.exit(-1)
-
-
global options_table
parser = OptionParser(option_list=options_table)
@@ -89,6 +79,16 @@ def main():
sys.stderr.write("Nothing to do\n")
sys.exit(0)
+ if not options.list:
+ for command in ['spacewalk-remove-channel', 'satellite-sync',
+ 'spacewalk-repo-sync']:
+ try:
+ LOCK.append(rhnLockfile.Lockfile(
+ os.path.join(LOCK_DIR, "%s.pid" % command)))
+ except rhnLockfile.LockfileLockedException:
+ print("ERROR: An instance of %s is running, exiting." %
command)
+ sys.exit(-1)
+
initCFG('server')
initLOG("stdout", options.verbose or 0)
Show replies by date