From 3598dacbed6167059a5b90901bf621ec47b7e749 Mon Sep 17 00:00:00 2001 From: apio Date: Sun, 30 Jul 2023 18:47:38 +0200 Subject: [PATCH] init: Remove support for 'Script' parameters This can now be changed to good old 'Command', putting a shebang into the script, thanks to the new shebang support in the kernel. --- apps/init.cpp | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/apps/init.cpp b/apps/init.cpp index 6ec99984..4df96dea 100644 --- a/apps/init.cpp +++ b/apps/init.cpp @@ -175,28 +175,10 @@ static Result load_service(const os::Path& path) if (parts[0].view() == "Command") { - if (!service.command.is_empty()) - { - do_log("[init] 'Command' cannot be specified after 'Script' has already been set! (%s)\n", - line.chars()); - return {}; - } service.command = move(parts[1]); continue; } - if (parts[0].view() == "Script") - { - if (!service.command.is_empty()) - { - do_log("[init] 'Script' cannot be specified after 'Command' has already been set! (%s)\n", - line.chars()); - return {}; - } - service.command = TRY(String::format("/bin/sh -- %s"_sv, parts[1].chars())); - continue; - } - if (parts[0].view() == "Restart") { if (parts[1].view() == "true" || parts[1].view().to_uint().value_or(0) == 1)