lfs-execline-scripts

Repository for execline scripts used in my linux-from-scratch builds
Log | Files | Refs

commit ca6df8c10c3284f596266f56bf22d72c3fa6108d
parent 71f128411d033beb427748337401f99830f47bb9
Author: mrgrouse <bdmfegys@duck.com>
Date:   Sun,  3 Aug 2025 04:07:34 -0400

fix case statement in svc.e and remove BASENAME variable

Diffstat:
Msvc/svc.e | 13++++---------
1 file changed, 4 insertions(+), 9 deletions(-)

diff --git a/svc/svc.e b/svc/svc.e @@ -1,5 +1,4 @@ #!/usr/bin/execlineb -S3 -backtick BASENAME { basename $0 } define BASEDIR "/etc/svc.d" case -N -- $1 @@ -10,7 +9,7 @@ case -N -- $1 { foreground { ln -sf "../avail/${2}" "run/${2}" - } printf "%s: '%s' activated.\n" $BASENAME ${2} + } printf "%s: '%s' activated.\n" ${0} ${2} } } # close -a "-d" {} @@ -22,21 +21,17 @@ case -N -- $1 # then { set -x - foreground { $BASENAME -k ${2} } + foreground { $0 -k ${2} } svc -s ${2} } # else { foreground { - printf "%s: please give a service name.\n" ${BASENAME} + printf "%s: please give a service name.\n" ${0} } exit 1 } } # close -r } # close case # default case -{ - foreground { printf "usage: %s [-askdlr] [service]\n" ${BASENAME} } exit 1 -} - # dont know if this is reachable but hey might as well -exit 0 +foreground { printf "usage: %s [-askdlr] [service]\n" ${0} } exit 1