#!/bin/sh
set -e

if [ "$1" = "configure" ]
then
    ldconfig
fi
#
#       Upgrade init if possible. There was a bug in all versions
#       up to and including 2.75-4, which didn't affect i386 but
#       did affect most other architectures.
#
sysvinitver="`dpkg -s sysvinit | grep ^Version: | sed -e 's/^Version: *//'`"
case "`uname -m`" in
        i?86)
                badsysvinitver="2.[0-6]*|2.7[0-3]*"
                ;;
        *)
                badsysvinitver="2.[0-6]*|2.7[0-4]*|2.75-*"
                ;;
esac
eval "case \"$sysvinitver\" in
        $badsysvinitver)
                ;;
        *)
                init u || true
                sleep 1
esac"
exit 0


