]> code.delx.au - refind/blobdiff - refind-install
Added support for ARM64 (AARCH64) platform in rEFInd, drivers, and
[refind] / refind-install
index 2562d1ea0c52b74a7de91ebb121bae3a66214bd6..b1510d77ec22a81a4250449d8532109a7070986b 100755 (executable)
@@ -36,6 +36,7 @@
 #
 # Revision history:
 #
+# 0.10.1  -- Improve extraction of default kernel options from /proc/cmdline.
 # 0.10.0  -- Enable running under OS X's recovery system & add warning about
 #            SIP & brief instructions on how to deal with it if SIP is
 #            detected to be enabled. Also change way refind_linux.conf default
@@ -1099,7 +1100,12 @@ GenerateRefindLinuxConf() {
          fi
       fi
       if [[ $RootDir == "/" ]] ; then
-         DefaultOptions=`cat /proc/cmdline | cut -d ' ' -f 2- | sed 's/$/ /' | sed 's/initrd=.* //g' | sed 's/ *$//'`
+         local FirstCmdlineOption=`cat /proc/cmdline | cut -d ' ' -f 1`
+         if [[ "$FirstCmdlineOption" =~ (vmlinuz|bzImage|kernel) ]] ; then
+            DefaultOptions=`cat /proc/cmdline | cut -d ' ' -f 2- | sed 's/\S*initrd=\S*//g' | sed 's/ *$//' | sed 's/^ *//'`
+         else
+            DefaultOptions=`cat /proc/cmdline | sed 's/\S*initrd=\S*//g' | sed 's/ *$//' | sed 's/^ *//'`
+         fi
       else
          if [[ -f "$RootDir/etc/default/grub" ]] ; then
             # We want the default options used by the distribution, stored here....