# HG changeset patch # User Franz Glasner # Date 1670456788 -3600 # Node ID d71f9efac6a8afadfcf95e0631535fde5b8dbe1c # Parent 619a32c6baaa178431b0c69b8a188115a8911a95 Enhance 800.local-ipv6-refresh: no need to include "rc.conf" and friends directly: use sysrc instead. This allows working with jails in future versions also. diff -r 619a32c6baaa -r d71f9efac6a8 etc/periodic/daily/800.local-ipv6-refresh --- a/etc/periodic/daily/800.local-ipv6-refresh Thu Dec 08 00:15:21 2022 +0100 +++ b/etc/periodic/daily/800.local-ipv6-refresh Thu Dec 08 00:46:28 2022 +0100 @@ -13,21 +13,11 @@ fi # -# Source in RC configurations also because we need the value of the -# IPv6 default router (if any). -# -if [ -r /etc/defaults/rc.conf ] -then - . /etc/defaults/rc.conf - source_rc_confs -fi - -# # Default configuration variables # : ${daily_local_ipv6_refresh_enable:="NO"} : ${daily_local_ipv6_refresh_flags="-n -w2 -q2 -m1 -I"} -: ${daily_local_ipv6_refresh_target:="${ipv6_defaultrouter}"} +: ${daily_local_ipv6_refresh_target=""} rc=0 @@ -44,8 +34,12 @@ ;; esac +if [ -z "${daily_local_ipv6_refresh_target}" ]; then + daily_local_ipv6_refresh_target="$(/usr/sbin/sysrc -i -n ipv6_defaultrouter)" +fi + case "${daily_local_ipv6_refresh_target}" in -"NO") +[Nn][Oo]) # SKIP because no target or no static IPv6 router given echo "$0: WARNING: \$daily_local_ipv6_refresh_target is \`NO'" 1>&2 ;;