#!/bin/sh
-# postinst script for spamassassin-cn
+# postinst script for kernel-2.6-cn
#
# see: dh_installdeb(1)
# import CN-functions
. /usr/share/carnet-tools/functions.sh
+# import GRUB helper functions
+. /usr/share/kernel-2.6-cn/grub-functions.sh
+
################################################################################
# starting up backup
fi
echo -n " grub4"
+# fix possible wrong params in menu.lst
+cp_check_and_sed '^# groot=' \
+ "s;^# groot=.*;# groot=$grub_root_device;g" \
+ /boot/grub/menu.lst || true
+cp_check_and_sed '^# kopt=' \
+ "s;^# kopt=\(.*\)root=[^[:space:]]*\(.*\);# kopt=\1root=$root_device\2;g" \
+ /boot/grub/menu.lst || true
+/usr/sbin/update-grub >/dev/null 2>&1 || true
+echo -n " grub5"
+
# restore execshield state
if [ ! -z "$SHIELD" ]; then
sysctl -w -e "kernel.exec-shield=$SHIELD" >/dev/null 2>&1