X-Git-Url: http://git.grml.org/?p=grml-autoconfig.git;a=blobdiff_plain;f=autoconfig.functions;h=3aa97875411206d2088d73f35a87a5e77afed324;hp=467c41ef1b340246b5925b2cd16667d1ded42c86;hb=cc3ead1e11553fc43ff4cf50b2b0e0db2899d887;hpb=fc67c1849a4eed7c2c0586dd65d77cec7d053768 diff --git a/autoconfig.functions b/autoconfig.functions index 467c41e..3aa9787 100755 --- a/autoconfig.functions +++ b/autoconfig.functions @@ -13,12 +13,10 @@ KERNEL="$(uname -r)" ARCH="$(uname -m)" umask 022 -# old linuxrc version: -[ -d /cdrom ] && export LIVECD_PATH=/cdrom -# initramfs layout until around December 2012: -[ -d /live/image ] && export LIVECD_PATH=/live/image -# initramfs layout since around December 2012: -[ -d /lib/live/mount/medium ] && export LIVECD_PATH=/lib/live/mount/medium +# initramfs layout since December 2012, backwards compatibility: +[ -d /lib/live/mount/medium ] && export LIVECD_PATH='/lib/live/mount/medium' +# initramfs layout since December 2018: +[ -d /run/live/medium ] && export LIVECD_PATH='/run/live/medium' # Ignore these signals in non-interactive mode: INT, TERM, SEGV [ -z "$PS1" ] && trap "" 2 3 11 @@ -1715,12 +1713,18 @@ config_lvm(){ fi eend 0 if checkbootparam 'lvm' ; then - einfo "Bootoption LVM found. Searching for logical volumes and enabling them:" if $SYSTEMD ; then - service_wrapper lvm2-lvmetad start - vgchange -ay - eend $? + einfo "Bootoption LVM found, enabling related services." + if [ -r /etc/init.d/lvm2-lvmetad ] ; then + service_wrapper lvm2-lvmetad start ; eend $? + fi + if [ -r /etc/init.d/lvm2-lvmpolld ] ; then + service_wrapper lvm2-lvmpolld start ; eend $? + fi + einfo "Searching for logical volumes and enabling them:" + vgchange -ay ; eend $? else + einfo "Bootoption LVM found. Searching for logical volumes and enabling them:" service_wrapper lvm2 start ; eend $? fi fi @@ -1878,7 +1882,7 @@ if $VIRTUALBOX ; then vbautomation="$(getbootparam 'vbautomation' 2>>$DEBUG)" fi - if ! VBoxControl sharedfolder list | egrep -q "^[0-9]+ - ${vbautomation}$" ; then + if ! VBoxControl sharedfolder list | egrep -q "^[0-9]+ - ${vbautomation}(\s+|$)" ; then ewarn "No automount shared folder '$vbautomation' available" eend 0 else