]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
91zipl: Don't use contents of commented lines
authorThomas Abraham <tabraham@suse.com>
Wed, 19 Dec 2018 23:24:41 +0000 (18:24 -0500)
committerHarald Hoyer <harald@hoyer.xyz>
Thu, 7 Feb 2019 10:48:34 +0000 (11:48 +0100)
Comment lines should be ignored. They should not be used for determining
the /boot/zipl device

modules.d/91zipl/module-setup.sh

index d0cd75da720d71c0cbff42d72332edd425828ce6..2f95fd55967465f09c5b47efaff6d7f629f8be2b 100755 (executable)
@@ -22,7 +22,7 @@ depends() {
 installkernel() {
     local _boot_zipl
 
-    _boot_zipl=$(sed -n 's/\(.*\)\w*\/boot\/zipl.*/\1/p' /etc/fstab)
+    _boot_zipl=$(sed -n -e '/^[[:space:]]*#/d' -e 's/\(.*\)\w*\/boot\/zipl.*/\1/p' /etc/fstab)
     if [ -n "$_boot_zipl" ] ; then
         eval $(blkid -s TYPE -o udev ${_boot_zipl})
         if [ -n "$ID_FS_TYPE" ] ; then
@@ -40,7 +40,7 @@ installkernel() {
 cmdline() {
     local _boot_zipl
 
-    _boot_zipl=$(sed -n 's/\(.*\)\w*\/boot\/zipl.*/\1/p' /etc/fstab)
+    _boot_zipl=$(sed -n -e '/^[[:space:]]*#/d' -e 's/\(.*\)\w*\/boot\/zipl.*/\1/p' /etc/fstab)
     if [ -n "$_boot_zipl" ] ; then
         echo "rd.zipl=${_boot_zipl}"
     fi