[Slackbuilds-users] Suggestion for packages which require a startup file.

Robert Kelsen rkelsen at optusnet.com.au
Sun Jun 20 11:44:58 UTC 2010


Hello Slackbuild builders!

My name is Rob, and I've been using Slackware for about 10 years now, but 
only recently jumped on board the Slackbuilds train.

I've got a suggestion for packages which require a startup file under 
/etc/rc.d.  It's something that the Dropline Gnome guys do...

Instead of requiring the user to edit rc.local, I think it's simpler to use
Slackware's out-of-the-box sysvinit-style capabilities.

For example, let's take TiMidity++. In the README which accompanies this
SlackBuild, the user is prompted to add "/etc/rc.d/rc.timidity start" to
/etc/rc.d/rc.local.  While this is a simple solution, it is by no means 
a tidy one.  After adding a few other things, rc.local becomes rather 
messy and difficult to maintain if the user doesn't delete or change lines 
as packages are upgraded or removed.

The proposed resolution to this issue:

A simple symlink.

Yes, a symlink (or series of symlinks). It can be included as part of the 
package, and is removed if a package is uninstalled.  

Using our TiMidity++ example above, the symlink would point to 
/etc/rc.d/rc.timidity and be located under /etc/rc.d/rc4.d.  You could
call it S99timidity or something similar.  I chose rc4.d, because it
makes sense that someone needing TiMidity++ would mainly use it in that 
runlevel.  It is a CLI-based tool, so you could add it to other runlevels
too.

The scripts (or symlinks pointing to them) under the /etc/rc.d/rc*.d 
directories are run towards the end of the boot sequence, provided that 
/etc/rc.d/rc.sysvinit is executable.

If the user doesn't want the script to run at bootup, all they have to do 
is "chmod -x /etc/rc.d/rc.timidity" or delete the symlink.  The best part
is that they don't need to edit anything to make the package work.

It's simple, but it makes things tidier, IMO.

Apologies if this sort of thing has been discussed before.

Cheers,


Rob Kelsen


More information about the SlackBuilds-users mailing list