Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 86348 - Please make the name of the init script available in the init system
Summary: Please make the name of the init script available in the init system
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] baselayout (show other bugs)
Hardware: All All
: High enhancement (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-03-22 22:57 UTC by Robin Johnson
Modified: 2005-04-28 20:05 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2005-03-22 22:57:26 UTC
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.
Comment 1 SpanKY gentoo-dev 2005-04-28 20:05:37 UTC
added but the variable is called SVCNAME