Merge pull request #8256 from cachedout/sys-shutdown

Modify system shutdown command.
This commit is contained in:
Joseph Hall 2013-11-04 16:45:03 -08:00
commit e93faae1b6

View File

@ -75,7 +75,7 @@ def reboot():
return ret
def shutdown():
def shutdown(at_time=None):
'''
Shutdown a running system
@ -85,6 +85,10 @@ def shutdown():
salt '*' system.shutdown
'''
cmd = 'shutdown'
if at_time:
cmd = 'shutdown -h {0}'.format(at_time)
else:
cmd = 'shutdown -h now'
ret = __salt__['cmd.run'](cmd)
return ret