-# fix old kernel-2.4-cn postrm
-if [ -e /var/lib/dpkg/info/kernel-2.4-cn.postrm ]; then
- echo "CN: Fixed old kernel-2.4-cn postrm."
- cat > /var/lib/dpkg/info/kernel-2.4-cn.postrm.$$ <<EOF
-#!/bin/sh
-
-set -e
-
-# be sure, be safe
-if [ "$1" != "remove" ]; then
- exit 0
-fi
-
-# import CN-functions
-. /usr/share/carnet-tools/functions.sh
-
-# remove us from limits.conf
-cp-update -r kernel-2.4-cn /etc/security/limits.conf
-
-# remove us from modules
-cp-update -r kernel-2.4-cn /etc/modules
-EOF
- if ! cmp -s /var/lib/dpkg/info/kernel-2.4-cn.postrm \
- /var/lib/dpkg/info/kernel-2.4-cn.postrm.$$; then
- mv /var/lib/dpkg/info/kernel-2.4-cn.postrm.$$ \
- /var/lib/dpkg/info/kernel-2.4-cn.postrm
- chmod +x /var/lib/dpkg/info/kernel-2.4-cn.postrm
- fi
- rm -f /var/lib/dpkg/info/kernel-2.4-cn.postrm.$$
-fi
-
-################################################################################
-
-# fix old kernel-cn postrm
-if [ -e /var/lib/dpkg/info/kernel-cn.postrm ]; then
- echo "CN: Fixed old kernel-cn postrm."
- cat > /var/lib/dpkg/info/kernel-cn.postrm.$$ <<EOF
-#!/bin/sh
-
-set -e
-
-# be sure, be safe
-if [ "$1" != "remove" ]; then
- exit 0
-fi
-
-# import CN-functions
-. /usr/share/carnet-tools/functions.sh
-
-# remove us from limits.conf
-cp-update -r kernel-cn /etc/security/limits.conf
-
-# remove us from modules
-cp-update -r kernel-cn /etc/modules
-EOF
- if ! cmp -s /var/lib/dpkg/info/kernel-cn.postrm \
- /var/lib/dpkg/info/kernel-cn.postrm.$$; then
- mv /var/lib/dpkg/info/kernel-cn.postrm.$$ \
- /var/lib/dpkg/info/kernel-cn.postrm
- chmod +x /var/lib/dpkg/info/kernel-cn.postrm
- fi
- rm -f /var/lib/dpkg/info/kernel-cn.postrm.$$
-fi
-
-################################################################################
-