[Pkg-sysvinit-devel] Bug#339460: update-rc.d: a partial implementation of what I propose

Martin-Éric Racine q-funk at iki.fi
Wed Nov 16 14:46:22 UTC 2005


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

#!/bin/sh
# 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
done
apt-get --reinstall install $packages
#EOF

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
http://q-funk.iki.fi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.alioth.debian.org/pipermail/pkg-sysvinit-devel/attachments/20051116/c206cd77/attachment-0001.pgp


More information about the Pkg-sysvinit-devel mailing list