Copy /root to $jailbase/rw/$name/root

Copies /root to ${jailbase}/rw/${name}/root
Adds /root to /etc/fstab.${name}
This commit is contained in:
Jake Guffey 2012-04-23 13:43:27 -04:00
parent a4c89c5552
commit d39821782d

View file

@ -197,6 +197,11 @@ cat <<EOF
if [ -n "\$(ls ${jaildir}/base/usr/home)" ]; then if [ -n "\$(ls ${jaildir}/base/usr/home)" ]; then
cp -r ${jaildir}/base/usr/home/* "${jaildir}/rw/${name}/home/" cp -r ${jaildir}/base/usr/home/* "${jaildir}/rw/${name}/home/"
fi fi
mkdir "${jaildir}/rw/${name}/root"
if [ -n "\$(ls ${jaildir}/base/root)" ]; then
cp -r ${jaildir}/base/root/* "${jaildir}/rw/${name}/root/"
fi
EOF EOF
# Create the ro+rw mountpoint entries in fstab # Create the ro+rw mountpoint entries in fstab
@ -207,6 +212,7 @@ cat <<EOF
/usr/jail/rw/${name}/local /usr/jail/${name}/usr/local nullfs rw 0 0 /usr/jail/rw/${name}/local /usr/jail/${name}/usr/local nullfs rw 0 0
/usr/jail/rw/${name}/var /usr/jail/${name}/var nullfs rw 0 0 /usr/jail/rw/${name}/var /usr/jail/${name}/var nullfs rw 0 0
/usr/jail/rw/${name}/home /usr/jail/${name}/usr/home nullfs rw 0 0 /usr/jail/rw/${name}/home /usr/jail/${name}/usr/home nullfs rw 0 0
/usr/jail/rw/${name}/root /usr/jail/${name}/root nullfs rw 0 0
END END
EOF EOF