Skip to content

Commit

Permalink
VirtualBox shared folders: adjust check for detecting shared folder
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
mika committed Jul 3, 2020
1 parent a962696 commit 289b3ef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion autoconfig.functions
Expand Up @@ -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
Expand Down

0 comments on commit 289b3ef

Please sign in to comment.