Ugly but it does a fine job as a proof of concept:

# restore RC symbolic links per each package's postinst script defaults
packages=`dpkg -S /etc/init.d/* | cut -f 1 -d : | sort | uniq | xargs`
for name in $packages; do
        update-rc.d -f $name remove
apt-get --reinstall install $packages

Of course, ideally, we would have all package scripts guaranteed to be
fully idempotent, which would then make it easier to just grep and call
each /var/lib/dpkg/info/$name.postinst for a replay.

Martin-Éric Racine

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to