Skip to content

Commit

Permalink
mt: fstab fixes
Browse files Browse the repository at this point in the history
- host: ntpd stop -> onestop
  • Loading branch information
msimerson committed Nov 12, 2024
1 parent c1b6cf8 commit f300f44
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
18 changes: 15 additions & 3 deletions mail-toaster.sh
Original file line number Diff line number Diff line change
Expand Up @@ -500,20 +500,32 @@ get_safe_jail_path()
fi
}

get_jail_fstab()
{
if [ "$1" = "base" ]; then
echo "mount.fstab = \"$BASE_MNT/data/etc/fstab\";"
else
echo "mount.fstab = \"$ZFS_DATA_MNT/$1/etc/fstab\";"
fi
}

add_jail_conf_d()
{
local _pfrule=''
local _fstab=
_fstab=$(get_jail_fstab $1)

if [ "$1" != "base" ]; then
_pfrule="
exec.created = "$ZFS_DATA_MNT/$1/etc/pf.conf.d/pfrule.sh load";
exec.poststop = "$ZFS_DATA_MNT/$1/etc/pf.conf.d/pfrule.sh unload";"
exec.created = \"$ZFS_DATA_MNT/$1/etc/pf.conf.d/pfrule.sh load\";
exec.poststop = \"$ZFS_DATA_MNT/$1/etc/pf.conf.d/pfrule.sh unload\";"
fi

store_config "/etc/jail.conf.d/$(safe_jailname $1).conf" <<EO_JAIL_RC
$(jail_conf_header $1)
$(safe_jailname $1) {$(get_safe_jail_path $1)
mount.fstab = "$ZFS_DATA_MNT/$1/etc/fstab";
$_fstab
ip4.addr = $JAIL_NET_INTERFACE|${_jail_ip};
ip6.addr = $JAIL_NET_INTERFACE|$(get_jail_ip6 $1);${JAIL_CONF_EXTRA}$_pfrule
}
Expand Down
2 changes: 1 addition & 1 deletion provision/host.sh
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ disable_ntpd()
{
if grep -q ^ntpd_enable /etc/rc.conf; then
tell_status "disabling NTPd"
service ntpd stop
service ntpd onestop
sysrc ntpd_enable=NO
fi

Expand Down

0 comments on commit f300f44

Please sign in to comment.