On 12/20/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Here is an example from /etc/init.d/gpm below. It is not apparent > where any of those variables get filled with a value. I see nothing > being sourced either. Further, what scripting language uses: > ebegin > eend
A major feature of every language worth knowing is the ability to write functions. ebegin and eend are exactly that, functions (or procedures if you like) written in bash. In the case of ebegin/eend, these are defined in /etc/init.d/functions.sh. All of the init scripts are executed by /sbin/runscript (see the first line of gpm). Now, this is where you would need to look at the source for baselayout, since /sbin/runscript is a binary executable, but the only thing that you really need to know is that /sbin/runscript runs /sbin/runscript.sh, which is just a bash script. It is this script which sources functions.sh and takes care of starting (via svc_start()) or stopping (via svc_stop()) the init script. I'm not sure what else /sbin/runscript does, as I haven't looked at the source for that. -Richard -- gentoo-user@gentoo.org mailing list