aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2019-03-18 14:45:29 -0300
committerSilvio Rhatto <rhatto@riseup.net>2019-03-18 14:45:29 -0300
commit4a32d7076c7b37951c72729faeba20d7e0930910 (patch)
treee2d08582e328a6eefa0a42171cbbab4b8bfafa60
parent89848e93a5b84d6999258b4325203a6acfca9c0e (diff)
downloadkvmx-4a32d7076c7b37951c72729faeba20d7e0930910.tar.gz
kvmx-4a32d7076c7b37951c72729faeba20d7e0930910.tar.bz2
Ensure shared folders exists
-rwxr-xr-xkvmx2
1 files changed, 2 insertions, 0 deletions
diff --git a/kvmx b/kvmx
index 36b1150..2134e82 100755
--- a/kvmx
+++ b/kvmx
@@ -336,6 +336,7 @@ function kvmx_up {
if [ ! -z "$shared_folder" ]; then
# Get absolute path of shared folder relative to project path
+ mkdir -p $shared_folder
shared_folder="`cd $KVMX_PROJECT_FOLDER && cd $shared_folder &> /dev/null && pwd`"
# Requires samba package installed in the host; see http://unix.stackexchange.com/a/183609
#local shared="-net user,smb=$shared_folder"
@@ -352,6 +353,7 @@ function kvmx_up {
local shared_folder_mountpoint="`echo $shared_item | cut -d ':' -f 3`"
# Get absolute path of shared folder relative to project path
+ mkdir -p $shared_folder
shared_folder="`cd $KVMX_PROJECT_FOLDER && cd $shared_folder &> /dev/null && pwd`"
shared="$shared -fsdev local,id=$id,path=$shared_folder,security_model=none -device virtio-9p-pci,fsdev=$id,mount_tag=$id"