X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?a=blobdiff_plain;f=debian%2Fpostinst;h=e6d7b0a878c45663e1db7871614ccb2d246a2e3c;hb=f6676590525ca740e8cc78b7a1a156a8f6a9b9d6;hp=05e3d63374bc52aebcd61453efbd67a9b4b4afca;hpb=3ae9cfd0860afe734c6d96e33d9d4ec320497c9f;p=kernel-cn.git diff --git a/debian/postinst b/debian/postinst index 05e3d63..e6d7b0a 100755 --- a/debian/postinst +++ b/debian/postinst @@ -27,6 +27,9 @@ case "$1" in ;; esac +# Source debconf library. +. /usr/share/debconf/confmodule + # import CN-functions . /usr/share/carnet-tools/functions.sh @@ -69,6 +72,20 @@ echo "CN: Removed old symlinks in / and /boot." ################################################################################ +DIVERT_TO="grub grub-probe" + +echo -n "CN: Undiverting binaries:" +for i in $DIVERT_TO; do + if [ -e /usr/sbin/$i.real ]; then + dpkg-divert --remove --rename --package 'kernel-2.6-cn' \ + --divert /usr/sbin/$i.real /usr/sbin/$i >/dev/null + echo -n " $i" + fi +done +echo "." + +################################################################################ + # intro msg echo -n "CN: Configuring system (this will take a while):" @@ -332,9 +349,9 @@ net.ipv4.tcp_syncookies=1 vm.mmap_min_addr=65536 EOF -# old kernel params +# old kernel params (skipping some of the obsolete or overrided entries) if [ -e /etc/sysctl.conf ]; then - egrep -v 'net\.core\.(r|w)mem_max|net\.ipv4\.tcp_(r|w)mem|vm\.bdflush|net\.ipv4\.ip_local_port_range|kernel\.rtsig-max|net\.ipv4\.tcp_syncookies|kernel\.exec-shield|net\.ipv4\.tcp_max_syn_backlog|net\.ipv4\.tcp_congestion_control' \ + egrep -v 'net\.core\.(r|w)mem_max|net\.ipv4\.tcp_(r|w)mem|vm\.bdflush|net\.ipv4\.ip_local_port_range|kernel\.rtsig-max|net\.ipv4\.tcp_syncookies|kernel\.exec-shield|net\.ipv4\.tcp_max_syn_backlog|net\.ipv4\.tcp_congestion_control|kernel\.exec-shield' \ /etc/sysctl.conf >> /etc/sysctl.conf.$$ fi