Re: sysV script execution logic/naming convention?
"Bruce Dubbs" ([email protected] via lfs-support Mailing List) <[email protected]> Wed, 11 Feb 2026 12:09:40 -0600
| Newsgroups | gmane.linux.lfs.support |
|---|---|
| Message-ID | <[email protected]> |
This is a multi-part message in MIME format... ------------=_1770833393-959-6361 Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 2/11/26 9:47 AM, Thomas Seeling ([email protected] via lfs-support Mailing List) wrote: > Hello dear list, > > I have a question about execution of start/stop scripts. > > For testing I created /etc/rc.d/init.d/test-a-script.sh (note hyphens, dot and > extension) with mode 755. > It simply contains the usual boilerplate and *before the case switch* "echo ${0} > ${*}; sleep 3". > I have then linked the script to rc.3/S90test-a-script.sh, and to rc[036].d/K50test- > a-script.sh. > It works when I call it manually, it works when the system boots, but I don't see the > message at shutdown. > Is there some kind of naming convention for the symlinks which I violate using > hyphens, dots and/or extension? > It seems unlikely since the start script gets executed but not the stop script with > the same naming convention. > > The actual script I intend to install shall only run on shutdown, which it doesn't, > so I experimented with that testscript to find out about the conditions for startup > and stop. The scripts that are run are at /etc/rc.d/rc<runlevel>.d/S<name> Typically those are symlinks to the files in /etc/init.d/. Read through /etc/rc.d/init.d/rc to follow the logic. Also look at /etc/inittab to see how that is invoked. -- Bruce ------------=_1770833393-959-6361 Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 -- http://lists.linuxfromscratch.org/sympa/info/lfs-support Unsubscribe: See the above information page ------------=_1770833393-959-6361--