fix systemd test
This commit is contained in:
2
bin/sau
2
bin/sau
@ -48,7 +48,7 @@ def fork_and_reboot():
|
||||
log = logging.getLogger(sau.LOGNAME)
|
||||
if os.path.exist('/proc/1/comm'):
|
||||
with open('/proc/1/comm', 'r') as f:
|
||||
if f.readline() == 'systemd':
|
||||
if f.readline().strip() == 'systemd':
|
||||
os.execl('/usr/bin/systemctl', 'reboot')
|
||||
log.error("Failed to execl?")
|
||||
sys.exit(1)
|
||||
|
Reference in New Issue
Block a user