Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 16 Dec 2018 06:47:04 +0700
From:      Eugene Grosbein <eugen@freebsd.org>
To:        Ian Lepore <ian@freebsd.org>, Andre Albsmeier <Andre.Albsmeier@siemens.com>
Cc:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   Re: svn commit: r341794 - stable/11/etc/periodic/weekly
Message-ID:  <3a15a5aa-913a-88eb-a072-86526ef4899e@freebsd.org>
In-Reply-To: <1544893102.76088.70.camel@freebsd.org>
References:  <201812101424.wBAEOgbC053582@repo.freebsd.org> <20181215090926.GA33682@bali> <c00a7e0c-5258-26b2-efea-72af490d71a1@freebsd.org> <1544893102.76088.70.camel@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3a15a5aa-913a-88eb-a072-86526ef4899e>