pkg://wipl-daemon_20020601-11.1_i386.deb:51036/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 2>/dev/null >/dev/null
if test -x /usr/sbin/invoke-rc.d; then
invoke-rc.d wipl-daemon start
else
/etc/init.d/wipl-daemon start
fi
else
update-rc.d -f wipl-daemon remove 2>/dev/null >/dev/null
fi
set -e
fi
exit 0