From 6c3ab3b27d8b4f440bafde75c0a5cbde58a3b6b0 Mon Sep 17 00:00:00 2001 From: apio Date: Wed, 12 Jul 2023 19:46:53 +0200 Subject: [PATCH] init+base: Allow 'Description' fields in service files --- apps/init.cpp | 6 ++++++ base/etc/init/00-home | 3 ++- base/etc/init/01-motd | 1 + base/etc/init/99-login | 1 + 4 files changed, 10 insertions(+), 1 deletion(-) diff --git a/apps/init.cpp b/apps/init.cpp index 131c2166..43bd619a 100644 --- a/apps/init.cpp +++ b/apps/init.cpp @@ -154,6 +154,12 @@ static Result load_service(const os::Path& path) continue; } + if (parts[0].view() == "Description") + { + // We let users specify this in the config file, but init doesn't actually use it. + continue; + } + if (parts[0].view() == "Command") { if (!service.command.is_empty()) diff --git a/base/etc/init/00-home b/base/etc/init/00-home index 60e86c76..fccc6b0a 100644 --- a/base/etc/init/00-home +++ b/base/etc/init/00-home @@ -1,3 +1,4 @@ -Name=home +Name=mount-home +Description=Mount the user's home directory on a writable filesystem. Script=/etc/startup/selene-home.sh Wait=true diff --git a/base/etc/init/01-motd b/base/etc/init/01-motd index f82efa42..3c6d5aac 100644 --- a/base/etc/init/01-motd +++ b/base/etc/init/01-motd @@ -1,3 +1,4 @@ Name=motd +Description=Show the message of the day to the user. Command=/usr/bin/cat /etc/motd Wait=true diff --git a/base/etc/init/99-login b/base/etc/init/99-login index 6fabc8f4..2a3b5f95 100644 --- a/base/etc/init/99-login +++ b/base/etc/init/99-login @@ -1,3 +1,4 @@ Name=login +Description=Start the command-line login program. Command=/usr/bin/login Restart=true