Mercurial > hgrepos > FreeBSD > ports > sysutils > local-bsdtools
view etc/periodic/daily/800.local-ipv6-refresh @ 350:738fe7206eab
FIX: Allow emptying of the IPv6 refresh flags
| author | Franz Glasner <hg@dom66.de> |
|---|---|
| date | Wed, 07 Dec 2022 17:03:46 +0100 |
| parents | 7d07c4e214ee |
| children | 9d6b19f72ee5 |
line wrap: on
line source
#!/bin/sh # # @(#)@@PKGORIGIN@@ $HGid$ # # Daily script to keep the IPv6 routing working # # If there is a global system configuration file, suck it in. if [ -r /etc/defaults/periodic.conf ] then . /etc/defaults/periodic.conf source_periodic_confs 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}"} 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 "${daily_local_ipv6_refresh_target}" in "NO") # SKIP because no target or no static IPv6 router given echo 1>&2 "$0: WARNING: \$daily_local_ipv6_refresh_target is \`NO'" ;; '') # SKIP because this is an unresolvable router specification echo 1>&2 "$0: WARNING: \$ipv6_defaultrouter has an unexpected empty value" ;; *) if type anticongestion >/dev/null 2>&1; then anticongestion_sleeptime=60 anticongestion fi /usr/sbin/traceroute6 ${daily_local_ipv6_refresh_flags} "${daily_local_ipv6_refresh_target}" rc=$? ;; esac exit $rc
