On Sun, Apr 10, 2011 at 1:34 AM, Todd And Margo Chester <[email protected]> wrote:
> Interesting. Why would you want to stop or restart "Brctl addif br1 eth1"? For this very specific instance, you might not. The difficulty enters when you teach or encourage other people to pull this stunt with other settings, and they adopt it as standard practice. Having to edit or verify settings in a non-modular, unified /etc/rc.local has traditionally been awkward, error-prone, and liable to make systems hang or crash at boot time. I've had far too many systems in the last..... oh dear lord, I've been at this too long, over 20 yers.... get edited by a local "admin" who turned /etc/rc.local into a swamp of unparseable, mis-ordered, and impossible to manage personalized scripting. The whole SysV init script layout as implemented in our upstream vendor's tools was designed to provide individual configuration or service control, and includes reporting on the state. The big advantage is that you can turn it *off*, and disable it, without having to edit the potentially fragile /etc/rc.local file. Another advantage is when you tell people to edit /etc/rc.local, if they use the wrong editor, they'll break the symlink to /etc/rc.d/rc.local. Edit it with Emacs and neglect to follow the symlink, and you'll fail to record your edits in the symlinked target. And if you mishandle backing up and restoring your copy, you'll also break the symlink. It's subtle fragility that is undesirable in any production environment. > And, at least on my system, rc.local is started by S99local > > init.d]$ ls -al ../rc5.d/S99local > lrwxrwxrwx 1 root root 11 Nov 17 09:10 ../rc5.d/S99local -> ../rc.local > > I can see your point if you wanted to stop or restart things, or reverse > them > at shutdown, but if you only want to run them once, S99local (rc.local) is > a good place to put them. I have done this for many years. Never once > had a problem. What am I missing? You're missing over 20 years of pain and paranoia (which describes my IT career). It's not wildly unreasonable for a one-off. I've had to deal with lots of cluttered rc.local's, and unweave them, to stabilize systems. Deploying this kind of tweak to, say, 20 systems running kvm is a lot easier if you can put it in a separate cron script.
