From owner-svn-src-head@freebsd.org Sat Dec 15 23:20:09 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0A49F133255C; Sat, 15 Dec 2018 23:20:09 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A02598C11A; Sat, 15 Dec 2018 23:20:08 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8CF1E1E808; Sat, 15 Dec 2018 23:20:08 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBFNK8FA027782; Sat, 15 Dec 2018 23:20:08 GMT (envelope-from eugen@FreeBSD.org) Received: (from eugen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBFNK80c027781; Sat, 15 Dec 2018 23:20:08 GMT (envelope-from eugen@FreeBSD.org) Message-Id: <201812152320.wBFNK80c027781@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eugen set sender to eugen@FreeBSD.org using -f From: Eugene Grosbein Date: Sat, 15 Dec 2018 23:20:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342141 - head/usr.sbin/periodic/etc/weekly X-SVN-Group: head X-SVN-Commit-Author: eugen X-SVN-Commit-Paths: head/usr.sbin/periodic/etc/weekly X-SVN-Commit-Revision: 342141 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: A02598C11A X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.83 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.99)[-0.989,0]; NEURAL_HAM_LONG(-0.88)[-0.883,0]; NEURAL_HAM_SHORT(-0.96)[-0.963,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Dec 2018 23:20:09 -0000 Author: eugen Date: Sat Dec 15 23:20:08 2018 New Revision: 342141 URL: https://svnweb.freebsd.org/changeset/base/342141 Log: periodic/weekly/340.noid: do not use sysrc(8) that depends on bsdinstall(8) and may be non-functional for system built WITHOUT_BSDINSTALL. (*) Also, add a check for jails sharing whole tree with host (path=/) and do not skip it. Reported by: Andre.Albsmeier@siemens.com (*) MFC after: 1 week Modified: head/usr.sbin/periodic/etc/weekly/340.noid Modified: head/usr.sbin/periodic/etc/weekly/340.noid ============================================================================== --- head/usr.sbin/periodic/etc/weekly/340.noid Sat Dec 15 22:02:02 2018 (r342140) +++ head/usr.sbin/periodic/etc/weekly/340.noid Sat Dec 15 23:20:08 2018 (r342141) @@ -22,13 +22,24 @@ case "$weekly_noid_enable" in exclude='' if [ $(sysctl -n security.jail.jailed) = 0 ]; then + # For jail_conf + . /etc/rc.subr + load_rc_config jail + sep=: OIFS="$IFS" IFS="$sep" - for param in $(jail -f "`sysrc -n jail_conf`" -e "$sep" 2>/dev/null) + for param in $(jail -f "$jail_conf" -e "$sep" 2>/dev/null) do case "$param" in - path=*) exclude="$exclude -path ${param#path=} -prune -or" + path=*) + _p=${param#path=} + if [ -z "$_p" -o "$_p" = / ]; then + continue + fi + + exclude="$exclude -path $_p -prune -or" + ;; esac done IFS="$OIFS"