#!/bin/sh
-# postinst script for kernel-cn
-#
-# see: dh_installdeb(1)
set -e
-# summary of how this script can be called:
-# * <postinst> `configure' <most-recently-configured-version>
-# * <old-postinst> `abort-upgrade' <new version>
-# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
-# <new-version>
-# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
-# <failed-install-package> <version> `removing'
-# <conflicting-package> <version>
-# for details, see http://www.debian.org/doc/debian-policy/ or
-# the debian-policy package
-#
-
-case "$1" in
- configure|reconfigure)
- # continue below
- ;;
-
- *)
- exit 0
- ;;
-esac
-
-# Source debconf library.
+[ "$1" = "configure" ] || exit 0
+[ "$DEBIAN_SCRIPT_DEBUG" ] && set -vx
+
+# Load Debconf
. /usr/share/debconf/confmodule
-# import CN-functions
+# import CARNet Tools
. /usr/share/carnet-tools/functions.sh
# import GRUB helper functions
echo -n " sysctl.conf"
# reload sysctl ASAP
-if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
- invoke-rc.d procps restart >/dev/null 2>&1 || true
-else
- /etc/init.d/procps restart >/dev/null 2>&1 || true
-fi
+service procps restart
# finished with basic kernel-cn stuff
echo "."