aboutsummaryrefslogtreecommitdiff
path: root/init
diff options
context:
space:
mode:
Diffstat (limited to 'init')
-rwxr-xr-xinit11
1 files changed, 9 insertions, 2 deletions
diff --git a/init b/init
index e29de66..c4fd7e0 100755
--- a/init
+++ b/init
@@ -338,9 +338,15 @@ while read l || [ -n "$l" ]; do
info "mounting $d (buildos.$l) on $m"
- mkdir -p "$m"
o="defaults,noatime,nodiratime,user_subvol_rm_allowed"
echo "$d $m btrfs $o 0 0" >>$fstab
+
+ # Mount it and change the owner of the filesystem root.
+ #
+ mkdir -p "$m"
+ mount -t btrfs -o "$o" "$d" "$m"
+ chown build:build "$m"
+
continue
fi
done < <(lsblk --pairs --paths --output NAME,FSTYPE,LABEL)
@@ -367,7 +373,8 @@ fi
# compromized VMs will be able to upload to.
#
mkdir -p /build/tftp
-o="nodev,noexec,nosuid,size=200M,mode=0755,uid=$(id -u build),gid=$(id -g build)"
+o="nodev,noexec,nosuid,size=200M"
+o+=",mode=0755,uid=$(id -u build),gid=$(id -g build)"
echo "tmpfs /build/tftp tmpfs $o 0 0" >>$fstab
# Configure Postfix.