if datetime.datetime.now() > graceout:
success=utils.system(command)
else:
- success=os.system(command)
+ # truly silent, just print out a dot to show we're alive
+ print '.',
+ sys.stdout.flush()
+ command += " 2>/dev/null"
+ if self.options.dry_run:
+ print 'dry_run',command
+ success=0
+ else:
+ success=os.system(command)
if success==0:
utils.header('Successfully entered root@%s (%s)'%(hostname,message))
# refresh tocheck
# $Id$
-import time, os, re, glob
+import time, os, re, glob, sys
from pprint import PrettyPrinter
options={}
print 'dry_run:',command
return 0
else:
+ now=time.strftime("%H:%M:%S", time.localtime())
+ print "*",now,'--',
+ sys.stdout.flush()
return os.system("set -x; " + command)
### WARNING : this ALWAYS does its job, even in dry_run mode