Skip to content

Commit

Permalink
Expand the reboot command to full path
Browse files Browse the repository at this point in the history
  • Loading branch information
vvolam committed Sep 18, 2024
1 parent 0e0fc79 commit 12dd915
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions host_modules/systemd_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ def stop_service(self, service):
@host_service.method(host_service.bus_name(MOD_NAME), in_signature='s', out_signature='is')
def execute_reboot(self, rebootmethod):
if rebootmethod in REBOOTMETHOD_COLD_BOOT_VALUES:
cmd = ['reboot']
cmd = ['/usr/local/bin/reboot']
elif rebootmethod in REBOOTMETHOD_HALT_BOOT_VALUES:
cmd = ['sudo reboot','-p']
cmd = ['/usr/local/bin/reboot','-p']
else:
return EXIT_FAILURE, "{}: Invalid reboot method: {}".format(MOD_NAME, rebootmethod)

Expand Down

0 comments on commit 12dd915

Please sign in to comment.