diff options
author | Alexey Yushkin <636808@mail.ru> | 2023-03-03 13:59:38 +0300 |
---|---|---|
committer | Gleb Popov <arrowd@FreeBSD.org> | 2023-03-16 10:10:00 +0300 |
commit | 2c92e193cc5f7800b0f177b272edc772c10178be (patch) | |
tree | d4550e2dce82128e4e04d1e4ba44b4425a5abbf0 | |
parent | da926c1e8d31956b2da754a7449e97ca0619c8fd (diff) | |
download | freebsd-ports-2c92e193cc5f7800b0f177b272edc772c10178be.zip |
ports-mgmt/rc-subr-jail: Bug fixes.
- Fix check for "jail_mount_devfs" knob.
- Make "jail_nullfs_mounts" handle relative paths.
Co-authored-by: Alexey Donskov <voxnod@gmail.com>
-rw-r--r-- | ports-mgmt/rc-subr-jail/files/rc.subr.jail | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ports-mgmt/rc-subr-jail/files/rc.subr.jail b/ports-mgmt/rc-subr-jail/files/rc.subr.jail index 7d16c34bf9ee..c40101bbe5b1 100644 --- a/ports-mgmt/rc-subr-jail/files/rc.subr.jail +++ b/ports-mgmt/rc-subr-jail/files/rc.subr.jail @@ -91,8 +91,8 @@ prepare_jail() _src=$(echo "$_mnt_line" | awk '{print $1}') _dst=$(echo "$_mnt_line" | awk '{print $2}') _opts=$(echo "$_mnt_line" | awk '{print $3}') - mkdir -p "$_dst" - mount_nullfs -o "$_opts" "$_src" "$_dst" + /bin/sh -c "cd \"$jroot\" && mkdir -p \"$_dst\"" + /bin/sh -c "cd \"$jroot\" && mount_nullfs -o \"$_opts\" \"$_src\" \"$_dst\"" done fi @@ -120,8 +120,8 @@ destroy_jail() echo "$jail_nullfs_mounts" | xargs -n 3 | while read -r _mnt_line; do local _dst _dst=$(echo "$_mnt_line" | awk '{print $2}') - umount "$_dst" - rmdir "$_dst" + /bin/sh -c "cd \"$jroot\" && umount \"$_dst\"" 2> /dev/null + /bin/sh -c "cd \"$jroot\" && rmdir \"$_dst\"" 2> /dev/null done fi |