0byt3m1n1
Path:
/
var
/
lib
/
dpkg
/
info
/
[
Home
]
File: irqbalance.config
#!/bin/sh set -e . /usr/share/debconf/confmodule db_version 2.0 CONF=/etc/default/irqbalance CONFCONVERT=/etc/default/irqbalance.dpkg-needs-convert # config has no way to detect upgrade vs fresh installs, # so preinst hands us a flag files. UPGRADE_FLAG_FILE=/run/irqbalance.dpkg-upgrade INSTALL_FLAG_FILE=/run/irqbalance.dpkg-install is_irqbalance_enabled() { # If we are upgrading from a version without the .service file, we cannot # rely on systemctl is-enabled to tell us if the service was enabled or # not, we need to check if the LSB service was enabled in at least one # runlevel even if we are running systemd. if dpkg --compare-versions -- "$2" le-nl "1.1.0-2.2~"; then if ls /etc/rc*.d/S*irqbalance >/dev/null 2>&1; then return 0 else return 1 fi else # See https://bugs.debian.org/705254 but lets try ourselves for now... if [ -e /run/systemd/system ]; then if systemctl -q is-enabled irqbalance.service; then return 0 else return 1 fi else if ls /etc/rc*.d/S*irqbalance >/dev/null 2>&1; then return 0 else return 1 fi fi fi } if test -e $CONF || test -e $CONFCONVERT; then test -e $CONF && . $CONF || true test -e $CONFCONVERT && . $CONFCONVERT || true # ENABLED is the old format up for conversion, # will be switched to update-rc.d handling in postinst... if [ "$ENABLED" = "0" ]; then db_set irqbalance/enable false elif [ -e $UPGRADE_FLAG_FILE ] && ! is_irqbalance_enabled $*; then db_set irqbalance/enable false elif [ ! -e $INSTALL_FLAG_FILE ] && [ ! -e $UPGRADE_FLAG_FILE ]; then # dpkg-reconfigure if is_irqbalance_enabled $*; then db_set irqbalance/enable true else db_set irqbalance/enable false fi else db_set irqbalance/enable true fi # We no longer need flag files, clean up.... rm -f $UPGRADE_FLAG_FILE $INSTALL_FLAG_FILE # ONESHOT is the old format used before conversion. # Note: irqbalance.c treats IRQBALANCE_ONESHOT as active if set to # anything (even empty string). if [ "$ONESHOT" = "1" ] || [ ! -z ${IRQBALANCE_ONESHOT+x} ]; then db_set irqbalance/oneshot true else db_set irqbalance/oneshot false fi fi db_input low irqbalance/enable || true db_input medium irqbalance/oneshot || true db_go || true exit 0