FreeBSD Bugzilla – Attachment 246578 Details for
Bug 273088
/etc/periodic/weekly/340.noid: extend to support /etc/jail.conf.d/ exclusions
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Consider /etc/jail.conf.d/*.conf and /etc/jail.*.conf
340.noid.diff (text/plain), 1.43 KB, created by
Markus Stoff
on 2023-11-26 09:48:48 UTC
(
hide
)
Description:
Consider /etc/jail.conf.d/*.conf and /etc/jail.*.conf
Filename:
MIME Type:
Creator:
Markus Stoff
Created:
2023-11-26 09:48:48 UTC
Size:
1.43 KB
patch
obsolete
>diff --git a/usr.sbin/periodic/etc/weekly/340.noid b/usr.sbin/periodic/etc/weekly/340.noid >index 6151840ea..7b6e10651 100755 >--- a/usr.sbin/periodic/etc/weekly/340.noid >+++ b/usr.sbin/periodic/etc/weekly/340.noid >@@ -10,6 +10,26 @@ then > source_periodic_confs > fi > >+ >+jail_configs() { >+ local sep=${1?missing argument: sep} >+ if ls /etc/jail.*.conf >/dev/null 2>&1; then >+ parse_jail_configs "${sep}" /etc/jail.*.conf >+ fi >+ if ls /etc/jail.conf.d/*.conf >/dev/null 2>&1; then >+ parse_jail_configs "${sep}" /etc/jail.conf.d/*.conf >+ fi >+ parse_jail_configs "${sep}" "$jail_conf" >+} >+ >+parse_jail_configs() { >+ local sep=${1?missing argument: sep}; shift >+ local cfg_file >+ for cfg_file do >+ jail -f "${cfg_file}" -e "${sep}" 2>/dev/null >+ done >+} >+ > case "$weekly_noid_enable" in > [Yy][Ee][Ss]) > echo "" >@@ -25,21 +45,17 @@ case "$weekly_noid_enable" in > . /etc/rc.subr > load_rc_config jail > >- sep=: >+ sep=$'\n' > OIFS="$IFS" > IFS="$sep" >- for param in $(jail -f "$jail_conf" -e "$sep" 2>/dev/null) >+ for param in $(jail_configs "${sep}" | grep '^path=' | sort | uniq) > do >- case "$param" in >- path=*) >- _p=${param#path=} >- if [ -z "$_p" -o "$_p" = / ]; then >- continue >- fi >- >- exclude="$exclude -path $_p -prune -or" >- ;; >- esac >+ _p=${param#path=} >+ if [ -z "$_p" -o "$_p" = / ]; then >+ continue >+ fi >+ >+ exclude="$exclude -path $_p -prune -or" > done > IFS="$OIFS" > fi
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 273088
:
244040
| 246578