# HG changeset patch # User Franz Glasner # Date 1660866376 -7200 # Node ID cf4097c83691ff046334a9cb41e257518ce112e0 # Parent f9ba0fb173fb6999c7693435b59f3e429369d682 Allow enabling and disabling the daily local-ipv6-refresh script by periodic configuration variables. Also allow the configuration of the traceroute6 flags that are to be used. diff -r f9ba0fb173fb -r cf4097c83691 etc/periodic/daily/800.local-ipv6-refresh --- a/etc/periodic/daily/800.local-ipv6-refresh Fri Aug 19 01:19:10 2022 +0200 +++ b/etc/periodic/daily/800.local-ipv6-refresh Fri Aug 19 01:46:16 2022 +0200 @@ -22,18 +22,37 @@ source_rc_confs fi +# +# Default configuration variables +# +: ${daily_local_ipv6_refresh_enable:="NO"} +: ${daily_local_ipv6_refresh_flags:="-n -w2 -q2 -m1 -I"} + rc=0 +# Go on only if this script is enabled in the configuration +case "${daily_local_ipv6_refresh_enable}" in +[Yy][Ee][Ss]) + ;; +[Nn][Oo]) + exit 0 + ;; +*) + echo 1>&2 "$0: WARNING: \$daily_local_ipv6_refresh_enable is not set properly - assuming \"NO\" has been set" + exit 0 + ;; +esac + case "${ipv6_defaultrouter}" in - [Nn][Oo]) +[Nn][Oo]) # SKIP because no IP static IPv6 router given ;; - *) +*) if type anticongestion >/dev/null 2>&1; then - anticongestion_sleeptime=60 - anticongestion + anticongestion_sleeptime=60 + anticongestion fi - /usr/sbin/traceroute6 -n -w2 -q2 -m1 -I "${ipv6_defaultrouter}" + /usr/sbin/traceroute6 ${daily_local_ipv6_refresh_flags} "${ipv6_defaultrouter}" rc=$? ;; esac