From 12dd915da503c7c980bc29c12972146d1b8da274 Mon Sep 17 00:00:00 2001 From: Vasundhara Volam Date: Wed, 18 Sep 2024 22:54:20 +0000 Subject: [PATCH] Expand the reboot command to full path --- host_modules/systemd_service.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/host_modules/systemd_service.py b/host_modules/systemd_service.py index f96988c1..c77a2a45 100644 --- a/host_modules/systemd_service.py +++ b/host_modules/systemd_service.py @@ -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)