Berkeley CSUA MOTD:2010:April:22 Thursday <Wednesday>
Berkeley CSUA MOTD
2010/4/22-5/10 [Computer/SW/Languages/Misc] UID:53797 Activity:nil
4/22    In Linux is there an easy way to rename the scripts in /etc/rc?.d ?
        For example I want to set all the /etc/rc?.d/S91apache to S100apache
        so that it'll run the ramdisk BEFORE going to apache.
        \_ Sure, just move them.
           \_ I mean is there a script that will rename all of them
              for me? Like: setrc apache2 0 0 1 1 1 1
              instead of the following 6 times:
              mv rcX.d/S99apache rcX.d/K99apache
              mv rcX.d/K99apache rcX.d/S99apache
              mv rcX.d/K99apache rcX.d/S99apache
           \_ Yes.  "S100apache" won't work, though -- they're sorted
              alphabetically, not numerically.  Stick to two digits.
        \_ ideally the rc script order numbers are set by a comment line in
           the /etc/init.d version of hte file.  If you are managing the things
           with chkconfig, chkconfig the init script off, change the line in
           the init.d script, and then chkcnofig it back on.  The comment line
           looks like this:
                # chkconfig: - 60 20
Berkeley CSUA MOTD:2010:April:22 Thursday <Wednesday>