Przeglądaj źródła

grub/menu.lst に nokmsboot をつけるように %post を修正

git-svn-id: http://trac.vinelinux.org/repos/projects/specs@6912 ec354946-7b23-47d6-9f5a-488ba84defc7
daisuke 12 lat temu
rodzic
commit
3bc52642a6

+ 20 - 1
nonfree/xorg-x11-drv-nvidia/xorg-x11-drv-nvidia-vl.spec

@@ -304,6 +304,14 @@ for x in ${XORGCONF} ${XORGCONF}.dist ;do
     break
   fi
 done
+# add nokmsboot to boot cmdline
+GRUBCFG=/boot/grub/menu.lst
+if [ -f $GRUBCFG ]; then
+  if (! grep -q "kernel.*nokmsboot" $GRUBCFG); then
+    cp $GRUBCFG $GRUBCFG.rpmsave
+    sed -i -e "s|^\([[:space:]]kernel .*\)|\1 nokmsboot|g" $GRUBCFG
+  fi
+fi
 # Add to DKMS registry
 dkms add -m %{dkms_name} -v %{dkms_vers} %{?quiet} || :
 # Rebuild and make available for the currenty running kernel
@@ -315,7 +323,15 @@ dkms install -m %{dkms_name} -v %{dkms_vers} %{?quiet} --force || :
 dkms remove -m %{dkms_name} -v %{dkms_vers} %{?quiet} --all || :
 # Last removal, disable the proprietary driver
 if [ $1 -eq 0 ]; then
-    %{_sbindir}/nvidia-config-display disable || :
+  %{_sbindir}/nvidia-config-display disable || :
+  # remove nokmsboot to boot cmdline
+  GRUBCFG=/boot/grub/menu.lst
+  if [ -f $GRUBCFG ]; then
+    if (grep -q "kernel.*nokmsboot" $GRUBCFG); then
+      cp $GRUBCFG $GRUBCFG.rpmsave
+      sed -i -e "s|^\([[:space:]]kernel .*\)nokmsboot|\1|g" $GRUBCFG
+    fi
+  fi
 fi
 
 %postun -p /sbin/ldconfig
@@ -379,6 +395,9 @@ fi
 
 
 %changelog
+* Sat Sep 15 2012 Daisuke SUZUKI <daisuke@linux.or.jp> 
+- add nokmsboot to boot cmdline (grub's menu.lst)
+
 * Sat Sep 15 2012 Daisuke SUZUKI <daisuke@linux.or.jp> 304.43-1
 - update to 304.43