Dodana config skripta za rjesavanje grub diverta.
[kernel-cn.git] / debian / postinst
index 291078f..e6d7b0a 100755 (executable)
@@ -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):"
 
@@ -312,7 +329,6 @@ fi
 rm -f /etc/sysctl.conf.$$
 cat > /etc/sysctl.conf.$$ <<'EOF'
 kernel.maps_protect=1
-kernel.exec-shield=0
 net.core.rmem_default=1048576
 net.core.wmem_default=1048576
 net.ipv4.conf.all.accept_redirects=0