diff --git a/modules/data.lua b/modules/data.lua index 11ebefb..ddba35e 100644 --- a/modules/data.lua +++ b/modules/data.lua @@ -1,3 +1,4 @@ +local utils = require "../utils" local t = require "../utils/templater" local dirs = {} @@ -8,10 +9,12 @@ local function generate_mount_data() if dir.type == "file" then touch(dir.mountpoint) string = string .. t([[ +mkdir -p '{{dirname}}' || exit 1 touch -a '{{path}}' || exit 1 mount '{{path}}' '{{mountpoint}}' -o bind,umask=100,uid={{uid}},gid={{gid}} || exit 1 ]], - dir + { dirname = utils.dirname(dir.path), + path = dir.path, mountpoint = dir.mountpoint, uid = dir.uid, gid = dir.gid } ) elseif dir.type == "dir" then mkdir(dir.mountpoint)