[Pkg-sysvinit-devel] Bug#386661: sysv-rc: Quick way out: exim4 -> exim?

Petter Reinholdtsen pere at hungry.com
Sat Sep 9 09:23:52 UTC 2006


severity 386661 important
merge 386649 386661
thanks

[Olaf van der Spek]
> Isn't it possible to just run the postinst scripts of these packages again?

Probably, but I did not want to bypass dpkg.  Perhaps it is a good
idea in this case, to avoid having to pull in new versions of the
packages.

Something along these lines might work:

#!/bin/sh

# Set to true to bypass dpkg and run postinst directly.
bypass=false

if [ -f /var/log/dpkg.log ] ; then
    packages="`sed -n "/installed sysvinit 2.86.ds1-16/,/installed sysvinit 2.86.ds1-18/p" /var/log/dpkg.log | awk '/ upgrade / { print $4 } / installed / { print $5 }' | sort -u`"
else
    packages="`dpkg -S /etc/init.d/*|cut -d: -f1|sort -u`"
fi

for p in $packages ; do
    # Make sure it is installed
    if dpkg --get-selections $p | grep -qw install ; then
	# Only fix packages with init.d scripts
	if dpkg -L $p | grep -q /etc/init.d/ ; then
	    brokenpackages="$brokenpackages $p"
	fi
    fi
done

if [ true = $bypass ] ; then
    for p in $brokenpackages ; do
	echo "Running package $p postinst"
	/var/lib/dpkg/info/$p.postinst configure
    done
else
    echo
    echo "**** Reinstalling these packages ****"
    echo "  $brokenpackages"
    echo
    apt-get --reinstall -u install $brokenpackages
fi    

> Just wondering, isn't Bcc supposed to be invisible?

Yeah.  Bug in mutt on the machine where I read my email.




More information about the Pkg-sysvinit-devel mailing list