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

Removing init.d stop scripts best practice?



What is the best procedure to use for removing a stop script from a
package?

Moving from:

  # Default-Start:     2 3 4 5
  # Default-Stop:      0 1 6

  dh_installinit

To:

  # Default-Start:     2 3 4 5
  # Default-Stop:

  dh_installinit --update-rcd-params="start 99 2 3 4 5 ."

If nothing more than the above is done then insserv complains with:

  insserv: warning: current stop runlevel(s) (0 1 6) of script `foo' overwrites defaults (empty).

But removing the links unconditionally in the postinst would fail to
preserve local changes, if perhaps all of the start links were already
removed by the local sysadmin then this would leave none behind to
indicate this.  Perhaps that is worrying too much about a corner case?

  rm -f /etc/rc[016].d/K??foo

I am sure that others have thought this through in detail.  Is there a
best practice for it?  Or should the stop scripts just be left behind
doing nothing to avoid the issue?

Thanks,
Bob

Attachment: signature.asc
Description: Digital signature


Reply to: