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
This commit is contained in:
parent
2b55ac719a
commit
cd4bbdcd62
@ -21,9 +21,13 @@ depend()
|
|||||||
|
|
||||||
start_pre()
|
start_pre()
|
||||||
{
|
{
|
||||||
|
if [ ! -e "$command" ]; then
|
||||||
|
eerror "$command is missing (please install s6)"
|
||||||
|
else
|
||||||
einfo "Creating s6 scan directory"
|
einfo "Creating s6 scan directory"
|
||||||
checkpath -d -m 0755 "$RC_SVCDIR"/s6-scan
|
checkpath -d -m 0755 "$RC_SVCDIR"/s6-scan
|
||||||
return $?
|
fi
|
||||||
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
stop_post()
|
stop_post()
|
||||||
|
Loading…
Reference in New Issue
Block a user