svn commit: r341794 - stable/11/etc/periodic/weekly

Eugene Grosbein eugen at freebsd.org
Sat Dec 15 23:47:18 UTC 2018


15.12.2018 23:58, Ian Lepore wrote:

> It uses sysrc, which sources in /usr/share/bsdconfig/common.subr; this
> is the first reference to sysrc in any periodic script, so it does
> establish a new dependency, requiring sysrc to be installed on any
> system that runs periodic scripts.

Thanks, I've re-implemented this without sysrc.

> A safer way to extract the root path of all running jails might be
> something like:
> 
>   if which -s jls; then
>       allpaths="$(jls -d path)"
>       for onepath in ${allpaths}; do 
>           # do whatever with ${onepath} here
>       done
>   fi

This needs to check for all configured full-blown jails including maybe not running at the moment.
sysrc is handy but is not really necessary.

Andre, this should fix it for your case, please test:

fetch -o /tmp/noid.diff 'https://svnweb.freebsd.org/base/head/usr.sbin/periodic/etc/weekly/340.noid?view=patch&r1=342141&r2=342140&pathrev=342141'
cd /etc/periodic/weekly && patch -p5 < /tmp/noid.diff

Then re-run /etc/periodic/weekly/340.noid
Do not forget to remove 340.noid.orig if fixed script succeeds or rename it back to 340.noit if not.



More information about the svn-src-all mailing list