Are you sure that's the correct way to do it? I'm aware of using rc.local for things like calling simple programs or services.
There is no "correct" way other than the method that works best for you! I am no fan of priesthood ideology
, so do what pleases you. Life is always a balancing act of potential risk versus the perceived benefits you believe you might receive.
With that said, however, franklin
, and drkstr
raise a valid point if you decide to remain with the Slackware distro. With every Slackware release, or at least, every time you update to a newer release, you bear the responsibility of comparing the new rc.d
scripts with your existing rc.d
scripts. The fewer modifications you make in the current versions, the less work for you when you update.
With that said, one person's concept of work is another person's concept of leisure. I have modified my rc.d
scripts. Primarily to colorize the scripts
, but I also have added a few tweaks of my own. Not many---just a few. Yes, when I update to a new Slackware release
I have to manually compare all of the scripts. I accept and cheerfully bear the responsibility for my decision.
I use Kompare
in KDE because of the nice visual feedback. Should there be any new differences between scripts, I then modify my scripts to accommodate those new additions.
I maintain a separate set of partitions for testing. I can botch those partitions and not touch my production partitions.
Yes, for me there remains some "extra" manual labor to update Slackware because I decided to modify the existing rc.d
scripts. Yet, despite my willingness to modify those scripts, I nonetheless place all of my user-based additions in rc.local
. As a general principle, I prefer to modify the rc.d
scripts as little as possible. Other than my colorization effort, the few mods I have made are minor tweaks only. Additionally, just about anything I want to add does not depend upon any booting order or preference within the boot sequence. Therefore rc.local
is a fine place for my additions.
Similar to drumz
, I created an rc.shutdown
script to manage various shutdown tasks not directly addressed by the existing rc.d
Although my modified rc.d
scripts all run without a hitch, I maintain an /etc/rc.d.orig
directory where I maintain the original scripts. Thus, I easily can compare scripts if the need arises, but that hasn't happened in a long time.
One of the wonderful aspects about free software
is Freedom No. 1: The freedom to study how the program works, and adapt it to your needs. So do as you see fit, but bear in mind that the folks here are merely trying to help you.