| Server IP : 192.241.186.36 / Your IP : 216.73.216.164 Web Server : Apache/2.4.29 (Ubuntu) System : Linux webserver7 4.15.0-194-generic #205-Ubuntu SMP Fri Sep 16 19:49:27 UTC 2022 x86_64 User : root ( 0) PHP Version : 7.4.32 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /var/lib/dpkg/info/ |
Upload File : |
#!/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