pkg://wipl-daemon_20020601-10_powerpc.deb:52664/postinst
info downloads
#! /bin/sh
# postinst script for wipl
#
# see: dh_installdeb(1)
. /usr/share/debconf/confmodule || true
set -e
if [ "$1" = "configure" ]; then
# Create the log file
touch /var/log/wipld.log
chown wipld.wipld /var/log/wipld.log
chmod 0600 /var/log/wipld.log
# Setup wipl-daemon configuration files
RET=eth0
db_get wipl-daemon/interface || true
if ! [ -e /etc/wipld.conf ]; then
cat /usr/share/wipl-daemon/wipld.conf-dist |sed -e "s/[^#]*netdev: .*/netdev: $RET/g" > /etc/wipld.conf
else
cp -a /etc/wipld.conf /etc/wipld.conf.dpkg-old
cat /etc/wipld.conf.dpkg-old |sed -e "s/[^#]*netdev: .*/netdev: $RET/g" > /etc/wipld.conf
chmod 0644 /etc/wipld.conf
chmod 0644 /etc/wipld.conf.dpkg-old
fi
# Start and correctly setup /etc/rc.d
db_get wipl-daemon/run-or-not || true
set +e
if [ "$RET" = "true" ]; then
update-rc.d -f wipl-daemon defaults &>/dev/null
/etc/init.d/wipl-daemon start
else
update-rc.d -f wipl-daemon remove &>/dev/null
fi
set -e
fi
exit 0