]> Frank Brehm's Git Trees - pixelpark/create-vmware-tpl.git/commitdiff
Fixing tweak_grub() in bin/postinst
authorFrank Brehm <frank.brehm@pixelpark.com>
Thu, 29 Mar 2018 10:42:31 +0000 (12:42 +0200)
committerFrank Brehm <frank.brehm@pixelpark.com>
Thu, 29 Mar 2018 10:42:31 +0000 (12:42 +0200)
bin/postinst

index b432cf8e91df128aacfc09ed6a0a4fe10f2ee324..9bb0108a6ec3345cf2a7eb6f54dc7aa03e436f04 100644 (file)
@@ -264,7 +264,15 @@ tweak_grub() {
         echo
         log "Tweaking '${grub_cfg}' ..."
 
+        echo "Selecting entry in /etc/grub2.cfg ..."
+        awk -F\' '$1=="menuentry " {print i++ " : " $2}' /etc/grub2.cfg
+        grub2-set-default 0
+        grub2-editenv list
+
+        echo "Removing quiet from '${grub_cfg}' ..."
         sed --in-place=".bak.$( date -r ${grub_cfg} +'%Y-%m-%d_%H:%M:%S' )" -e 's/^\(GRUB_CMDLINE_LINUX=.*\)[  ]quiet\(.*\)/\1\2/' "${grub_cfg}"
+
+        echo "Recreating /boot/grub2/grub.cfg ..."
         grub2-mkconfig -o /boot/grub2/grub.cfg
 
     fi