postinst is in irqbalance 1.3.0-0.1.
This file is a maintainer script. It is executed when installing (*inst) or removing (*rm) the package.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 | #!/bin/sh
set -e
. /usr/share/debconf/confmodule
db_version 2.0
CONF=/etc/default/irqbalance
CONFCONVERT=/etc/default/irqbalance.dpkg-needs-convert
if [ "$1" = "configure" ]; then
if [ "$2" != "" ] && dpkg --compare-versions "$2" lt "1.0.5-1"; then
update-rc.d -f irqbalance remove >/dev/null
fi
# The debian/irqbalance.config file already takes care of
# integrating the old ENABLED and ONESHOT into the loop, but
# we still need this here to preserve any other random
# things the local sysadmin has added to the old /etc/default/irqbalance
# file to be policy compliant.
if [ -e $CONFCONVERT ]; then
# Insert a header to help sysadmin figure out why these things are here.
sed -i '1 i\# This file was modified on irqbalance 1.1.0-2.1 pkg upgrade. Preserved settings:' $CONFCONVERT
# Drop the ENABLED and ONESHOT settings, already handled via debconf.
sed -i -e '/ *ENABLED=.*/d' -e '/ *ONESHOT=.*/d' $CONFCONVERT
# Check if we have anything remaining except comments, if so
# we append the old file to the new one.
# This is to preserve any random things that might have
# been added to the file by the local sysadmin.
if grep -qv '^$\|^\s*#' $CONFCONVERT; then
cat $CONFCONVERT >> $CONF
fi
rm -f $CONFCONVERT
fi
db_get irqbalance/enable
update-rc.d irqbalance defaults >/dev/null
if [ "$RET" = "true" ]; then
update-rc.d irqbalance enable >/dev/null
else
update-rc.d irqbalance disable >/dev/null
fi
db_get irqbalance/oneshot
if [ "$RET" = "true" ]; then
# Modify existing line to enable or add a new one.
if grep -q '^\s*#*\s*IRQBALANCE_ONESHOT\s*=' $CONF ; then
sed -i 's/^\s*#*\s*IRQBALANCE_ONESHOT\s*=.*/IRQBALANCE_ONESHOT=yes/' $CONF
else
# Disable by commenting any existing line
# (or ignore relying on default disabled).
sed -i 's/^\s*IRQBALANCE_ONESHOT\s*=/#IRQBALANCE_ONESHOT=/' $CONF
fi
else
sed -i 's/^\s*IRQBALANCE_ONESHOT=/#IRQBALANCE_ONESHOT=/' $CONF
fi
db_stop
fi
# Automatically added by dh_systemd_enable/10.10.9ubuntu1
if deb-systemd-helper debian-installed 'irqbalance.service'; then
# This will only remove masks created by d-s-h on package removal.
deb-systemd-helper unmask 'irqbalance.service' >/dev/null || true
if deb-systemd-helper --quiet was-enabled 'irqbalance.service'; then
# Create new symlinks, if any.
deb-systemd-helper enable 'irqbalance.service' >/dev/null || true
fi
fi
# Update the statefile to add new symlinks (if any), which need to be cleaned
# up on purge. Also remove old symlinks.
deb-systemd-helper update-state 'irqbalance.service' >/dev/null || true
# End automatically added section
# Automatically added by dh_installinit/10.10.9ubuntu1
if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ]; then
if [ -x "/etc/init.d/irqbalance" ]; then
update-rc.d irqbalance defaults >/dev/null
invoke-rc.d irqbalance start || exit $?
fi
fi
# End automatically added section
# Automatically added by dh_installdeb/10.10.9ubuntu1
dpkg-maintscript-helper rm_conffile /etc/init/irqbalance.conf 1.2.0-0.1~ -- "$@"
# End automatically added section
|