- manji fixup.. sysctl -e -w vs. sysctl -w -e
[kernel-cn.git] / debian / postinst
index fd8dbf6..0312b32 100755 (executable)
@@ -109,8 +109,12 @@ echo -n " kernel-img.conf"
 # generate initial grub loaders
 if [ ! -d "$grub_dir" ]; then
     mkdir -p "$grub_dir"
+    # x86
     if [ -d /usr/lib/grub/i386-pc ]; then
         cp -a /usr/lib/grub/i386-pc/* "$grub_dir"
+    # x86_64
+    elif [ -d /usr/lib/grub/x86_64-pc ]; then
+        cp -a /usr/lib/grub/x86_64-pc/* "$grub_dir"
     fi
 fi
 echo -n " grub1"
@@ -143,7 +147,7 @@ echo -n " grub3"
 # workaround execshield
 SHIELD=$(sysctl -e -n kernel.exec-shield)
 if [ ! -z "$SHIELD" ]; then
-    sysctl -w -e kernel.exec-shield=0 >/dev/null 2>&1
+    sysctl -e -w kernel.exec-shield=0 >/dev/null 2>&1
     echo -n " execshield1"
 fi
 
@@ -246,7 +250,7 @@ echo -n " grub8"
 
 # restore execshield state
 if [ ! -z "$SHIELD" ]; then
-    sysctl -w -e "kernel.exec-shield=$SHIELD" >/dev/null 2>&1
+    sysctl -e -w "kernel.exec-shield=$SHIELD" >/dev/null 2>&1
     echo -n " execshield2"
 fi