[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [RFH] !!SOS!! totally hosed init system



On Sat, Jan 04, 2014 at 08:07:08PM +0100, Thorsten Glaser wrote:
> On Fri, 3 Jan 2014, Roger Leigh wrote:
> 
> > If file-rc and/or the maintainer scripts somehow restored the links
> > incorrectly, then insserv will ignore the header and preserve your
> > customisations
> 
> Hm. I can’t remember *ever* doing *any* customisations.
> I normally just put an “exit 0” below the shebang to disable
> an init script as, back then, nobody knew what the right way
> was (now we know update-rc.d is supposed to be used).
> 
> But then, I migrated to file-rc *extremely* early, so it’d
> obviously not got “all” links in its backup.
> 
> > "insserv -d" should revert to the defaults.  And there's not usually
> > any reason to deviate from them.
> 
> Hm, all it did for me was to emit all those warnings again.
> 
> > If not, you could remove the structure entirely and then try re-
> > running "insserv -d" again.
> 
> Ah! So basically “rm -rf /etc/rc*.d” followed by “insserv -d”?
> That may very well be the missing piece. I’ll try that on Monday
> (not right now where I have only remote access), but thanks already.

It might be safer to do something like this:

rm /etc/rc?.d/S* /etc/rc?.d/K*
foreach script in $(ls -1 /etc/init.d | egrep -v "\.dpkg|README|skeleton")
do
  insserv -d "$script"
done

Maybe try that without the initial rm first for safety.


Regards,
Roger

-- 
  .''`.  Roger Leigh
 : :' :  Debian GNU/Linux    http://people.debian.org/~rleigh/
 `. `'   schroot and sbuild  http://alioth.debian.org/projects/buildd-tools
   `-    GPG Public Key      F33D 281D 470A B443 6756 147C 07B3 C8BC 4083 E800


Reply to: