aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnna (navi) Figueiredo Gomes <navi@vlhl.dev>2024-07-21 15:48:56 +0200
committerAnna (navi) Figueiredo Gomes <navi@vlhl.dev>2024-07-21 15:48:56 +0200
commitdce704df35a708e4d2afffbe9f8ca59b00d8605b (patch)
tree8ed7c49bc3a332dc123e3d58d4684cbab3b2434c
parent8e251296ee9c6e034d7621152d12638381bcb959 (diff)
user-init.sh: print message on error
Signed-off-by: Anna (navi) Figueiredo Gomes <navi@vlhl.dev>
-rw-r--r--sh/user-init.sh.in4
1 files changed, 3 insertions, 1 deletions
diff --git a/sh/user-init.sh.in b/sh/user-init.sh.in
index eaedc631..a438be55 100644
--- a/sh/user-init.sh.in
+++ b/sh/user-init.sh.in
@@ -1,5 +1,7 @@
#!@SHELL@
+. @LIBEXECDIR@/sh/functions.sh
+
sourcex()
{
if [ "$1" = "-e" ]; then
@@ -20,7 +22,7 @@ sourcex -e "$_sysconf/rc.conf"
case $1 in
start) _runlevel="${rc_user_runlevel:-default}";;
stop) _runlevel="${rc_user_shutdown_runlevel:-none}";;
- *) exit 1
+ *) eerror "no argument given to $0"r exit 1
esac
mkdir -p "$_sysconf/runlevels/$_runlevel"