3

sysv-rc was installed to get a hold of systems autostart, but in the end it wasn't needed (as update-rc.d came in handy). So I dumbly do apt-get purge sysv-rc and type Yes, do as I say! to the apt prompt and bam! - no dirs/files in /etc/rc?.d

What can/should I do? I believe I don't have full backup for this server.

And I also tried doing i.e. update-rc.d mysql defaults but it seems it only edits /etc/runlevel.conf and doesn't involve direct actions with etc/rc?.d/ :(

edit: can anyone also help out with the link on how /etc/rc?.d/ is generated? If I still have /etc/runlevel.conf, is there any chance /etc/rc?.d/ dirs/simlinks will be recreated automatically after system reboot? Thanks.

kK-Storm
  • 167
  • 2
  • 7
  • See also: http://serverfault.com/questions/133505/rebuilding-etc-rc-d-links – jscott Jul 08 '14 at 14:38
  • Have you tried installing sysv-rc back? And then try rebuilding using `insserv /etc/init.d` or something similar – ptman Jul 08 '14 at 14:40
  • @jscott thanks, seen that though. Problem is I in no way can remember the order of process' start/stop. – kK-Storm Jul 08 '14 at 14:52
  • @ptman I installed `sysv-rc` and `sysv-rc-conf` back and it seems it generated all `/etc/rc?.d/` dirs with proper symlinks to `init.d` scripts! Thanks so much. Do you mind making this a proper answer to my question so I could vote it? – kK-Storm Jul 08 '14 at 14:54
  • 2
    Don't ever type "Yes, do as I say!" because merely _seeing_ that prompt means you are about to break your system. While you got lucky here, you probably will not be so lucky next time. – Michael Hampton Jul 08 '14 at 15:51

1 Answers1

3

Reinstall the purged package (sysv-rc). If that isn't enough, try to recreate the links using insserv /etc/init.d or something similar.

ptman
  • 28,394
  • 2
  • 30
  • 45