Skip to content

Commit

Permalink
2
Browse files Browse the repository at this point in the history
  • Loading branch information
gdraheim committed Oct 14, 2023
1 parent f3c8dc0 commit a2b06ed
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions files/docker/systemctl.py
Original file line number Diff line number Diff line change
Expand Up @@ -2938,7 +2938,7 @@ def do_start_service_from(self, conf):
returncode = 0
service_result = "success"
if True:
if runs in ["simple", "forking", "notify", "idle"]:
if runs in ["simple", "exec", "forking", "notify", "idle"]:
env["MAINPID"] = strE(self.read_mainpid_from(conf))
for cmd in conf.getlist(Service, "ExecStartPre", []):
exe, newcmd = self.exec_newcmd(cmd, env, conf)
Expand Down Expand Up @@ -2981,7 +2981,7 @@ def do_start_service_from(self, conf):
self.set_status_from(conf, "ExecMainCode", strE(returncode))
active = returncode and "failed" or "active"
self.write_status_from(conf, AS=active)
elif runs in ["simple", "idle"]:
elif runs in ["simple", "exec", "idle"]:
status_file = self.get_status_file_from(conf)
pid = self.read_mainpid_from(conf)
if self.is_active_pid(pid):
Expand Down Expand Up @@ -3650,7 +3650,7 @@ def do_stop_service_from(self, conf):
self.do_kill_unit_from(conf)
self.clean_pid_file_from(conf)
self.clean_status_from(conf) # "inactive"
elif runs in ["simple", "notify", "idle"]:
elif runs in ["simple", "exec", "notify", "idle"]:
status_file = self.get_status_file_from(conf)
size = os.path.exists(status_file) and os.path.getsize(status_file)
logg.info("STATUS %s %s", status_file, size)
Expand Down Expand Up @@ -3864,7 +3864,7 @@ def do_reload_service_from(self, conf):
return True
service_directories = self.env_service_directories(conf)
env.update(service_directories)
if runs in ["simple", "notify", "forking", "idle"]:
if runs in ["simple", "exec", "notify", "forking", "idle"]:
if not self.is_active_from(conf):
logg.info("no reload on inactive service %s", conf.name())
return True
Expand Down Expand Up @@ -5212,7 +5212,7 @@ def syntax_check_service(self, conf, section = Service):
usedExecStart = []
usedExecStop = []
usedExecReload = []
if haveType not in ["simple", "forking", "notify", "oneshot", "dbus", "idle"]:
if haveType not in ["simple", "exec", "forking", "notify", "oneshot", "dbus", "idle"]:
logg.error(" %s: Failed to parse service type, ignoring: %s", unit, haveType)
errors += 100
for line in haveExecStart:
Expand Down Expand Up @@ -5245,7 +5245,7 @@ def syntax_check_service(self, conf, section = Service):
logg.info("%s: %s exe = %s", unit, section, exe)
errors += 1
usedExecReload.append(line)
if haveType in ["simple", "notify", "forking", "idle"]:
if haveType in ["simple", "exec", "notify", "forking", "idle"]:
if not usedExecStart and not usedExecStop:
logg.error(" %s: %s lacks both ExecStart and ExecStop= setting. Refusing.", unit, section)
errors += 101
Expand Down Expand Up @@ -6684,6 +6684,8 @@ def run(command, *modules):
help="Print unit dependencies as a list instead of a tree (ignored)")
_o.add_option("--no-pager", action="store_true",
help="Do not pipe output into pager (mostly ignored)")
_o.add_option("--no-warn", action="store_true",
help="Do not generate certain warnings (ignored)")
#
_o.add_option("-c", "--config", metavar="NAME=VAL", action="append", default=[],
help="..override internal variables (InitLoopSleep,SysInitTarget) {%default}")
Expand Down

0 comments on commit a2b06ed

Please sign in to comment.