From: Michael Prokop Date: Fri, 3 Jul 2020 14:59:32 +0000 (+0200) Subject: VirtualBox shared folders: expect exact match for automation folder name X-Git-Tag: v0.19.2~1 X-Git-Url: http://git.grml.org/?p=grml-autoconfig.git;a=commitdiff_plain;h=cc3ead1e11553fc43ff4cf50b2b0e0db2899d887 VirtualBox shared folders: expect exact match for automation folder name The shared folder for automation usage (`automation` by default) should only be enabled if it matches exactly the expected name. A folder named 'automations' shouldn't trigger automation, so adjust egrep command line. This work was funded by Grml-Forensic. --- diff --git a/autoconfig.functions b/autoconfig.functions index bf5f52e..3aa9787 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}\s*" ; then + if ! VBoxControl sharedfolder list | egrep -q "^[0-9]+ - ${vbautomation}(\s+|$)" ; then ewarn "No automount shared folder '$vbautomation' available" eend 0 else