aboutsummaryrefslogtreecommitdiff
path: root/init.d
diff options
context:
space:
mode:
authorKerin Millar <kfm@plushkava.net>2021-10-13 05:57:59 +0100
committerWilliam Hubbs <w.d.hubbs@gmail.com>2021-10-14 23:03:32 -0500
commitcd4bbdcd62be460dabc232f6bd52e3b2c347408a (patch)
treeed234bb7bb5387a67c6f04fcf7476ed063c13119 /init.d
parent2b55ac719afc797c3c774960475cdf273363cfae (diff)
init.d/s6-svscan.in: make sure $command exists
While the s6-svscan runscript belongs to OpenRC, the user is required to install s6 before it can actually be used, potentially leading to confusion. Check for the existence of $command in start_pre and, if it does not exist, bail out with an error that makes this observation. X-Gentoo-Bug: 816978 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=816978
Diffstat (limited to 'init.d')
-rw-r--r--init.d/s6-svscan.in10
1 files changed, 7 insertions, 3 deletions
diff --git a/init.d/s6-svscan.in b/init.d/s6-svscan.in
index 18ed0ad0..917e5c83 100644
--- a/init.d/s6-svscan.in
+++ b/init.d/s6-svscan.in
@@ -21,9 +21,13 @@ depend()
start_pre()
{
- einfo "Creating s6 scan directory"
- checkpath -d -m 0755 "$RC_SVCDIR"/s6-scan
- return $?
+ if [ ! -e "$command" ]; then
+ eerror "$command is missing (please install s6)"
+ else
+ einfo "Creating s6 scan directory"
+ checkpath -d -m 0755 "$RC_SVCDIR"/s6-scan
+ fi
+ return
}
stop_post()