From 9b77123938f6590d01deedb7d549bf85b3b3b2f0 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Tue, 5 Nov 2019 21:54:05 +0100 Subject: [PATCH] loaded -> start_on_boot, which is more meaningful ... --- src/yunohost/service.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/yunohost/service.py b/src/yunohost/service.py index 8f1e55669..abaf58f09 100644 --- a/src/yunohost/service.py +++ b/src/yunohost/service.py @@ -292,7 +292,7 @@ def service_status(names=[]): logger.error("Failed to get status information via dbus for service %s, systemctl didn't recognize this service ('NoSuchUnit')." % name) result[name] = { 'status': "unknown", - 'loaded': "unknown", + 'start_on_boot': "unknown", 'active': "unknown", 'active_at': "unknown", 'description': "Error: failed to get information for this service, it doesn't exists for systemd", @@ -315,7 +315,7 @@ def service_status(names=[]): result[name] = { 'status': str(status.get("SubState", "unknown")), - 'loaded': str(status.get("UnitFileState", "unknown")), + 'start_on_boot': str(status.get("UnitFileState", "unknown")), 'active': str(status.get("ActiveState", "unknown")), 'description': description, 'service_file_path': str(status.get("FragmentPath", "unknown")), @@ -324,8 +324,8 @@ def service_status(names=[]): # Fun stuff™ : to obtain the enabled/disabled status for sysv services, # gotta do this ... cf code of /lib/systemd/systemd-sysv-install - if result[name]["loaded"] == "generated": - result[name]["loaded"] = "enabled" if glob("/etc/rc[S5].d/S??"+name) else "disabled" + if result[name]["start_on_boot"] == "generated": + result[name]["start_on_boot"] = "enabled" if glob("/etc/rc[S5].d/S??"+name) else "disabled" if "ActiveEnterTimestamp" in status: result[name]['active_at'] = datetime.utcfromtimestamp(status["ActiveEnterTimestamp"] / 1000000)