From: Michael Prokop Date: Fri, 3 Jul 2020 14:43:49 +0000 (+0200) Subject: VirtualBox shared folders: adjust check for detecting shared folder X-Git-Tag: v0.19.2~2 X-Git-Url: http://git.grml.org/?p=grml-autoconfig.git;a=commitdiff_plain;h=289b3ef77f4db319dfa8b589f266e21b4851e10a VirtualBox shared folders: adjust check for detecting shared folder More recent VirtualBox versions provide output like: | 01 - automation [idRoot=0 writeable auto-mount host-icase guest-icase] While older VirtualBox versions listed only: | 01 - automation Adjust the grep command line, to support old and new VBoxControl output. This work was funded by Grml-Forensic. --- diff --git a/autoconfig.functions b/autoconfig.functions index 883231b..bf5f52e 100755 --- a/autoconfig.functions +++ b/autoconfig.functions @@ -1882,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