I'd like to write some init scripts that function in a similar fashion to the net.* init scripts, but this is presently very difficult, as the NAME of the script that was called is not currently available in the environment space of the init.d script. Here's a very short patch that makes it available: --- /sbin/runscript.sh.orig 2005-03-22 22:51:04.984791912 -0800 +++ /sbin/runscript.sh 2005-03-22 22:50:59.831575320 -0800 @@ -28,6 +28,7 @@ fi myservice=${myservice##*/} +export SERVICENAME="${myservice}" mylevel=$(<"${svcdir}/softlevel") It may also then be possible move some of the networking script stuff out of runscript.sh.
added but the variable is called SVCNAME