Page MenuHomeFreeBSD

D61435.1794510299.diff
No OneTemporary

Authored By
Unknown
Size
3 KB
Referenced Files
None
Subscribers
None

D61435.1794510299.diff

diff --git a/share/man/man5/periodic.conf.5 b/share/man/man5/periodic.conf.5
--- a/share/man/man5/periodic.conf.5
+++ b/share/man/man5/periodic.conf.5
@@ -23,7 +23,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd June 19, 2026
+.Dd November 11, 2026
.Dt PERIODIC.CONF 5
.Os
.Sh NAME
@@ -131,6 +131,13 @@
Refer to the
.Xr periodic 8
manual page for how script return codes are interpreted.
+.It Ao Ar dir Ac Ns Va _show_empty_output
+.Pq Vt bool
+Set to
+.Dq Li YES
+to still send an email even if no output was produced for the scripts
+found in
+.Ar dir .
.It Va anticongestion_sleeptime
.Pq Vt int
The maximum number of seconds to randomly sleep in order to smooth bursty loads
diff --git a/usr.sbin/periodic/periodic.8 b/usr.sbin/periodic/periodic.8
--- a/usr.sbin/periodic/periodic.8
+++ b/usr.sbin/periodic/periodic.8
@@ -22,7 +22,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd June 18, 2020
+.Dd November 11, 2026
.Dt PERIODIC 8
.Os
.Sh NAME
@@ -136,11 +136,10 @@
.Ql /
and is not empty, it is assumed to contain a list of email addresses, and
the output is mailed to them.
-If
+If the script did not produce any output, no email is sent, unless
.Ao Ar basedir Ac Ns Va _show_empty_output
is set to
-.Dq Li NO ,
-then no mail will be sent if the output was empty.
+.Dq Li YES .
.Pp
If
.Ao Ar basedir Ac Ns Va _output
diff --git a/usr.sbin/periodic/periodic.conf b/usr.sbin/periodic/periodic.conf
--- a/usr.sbin/periodic/periodic.conf
+++ b/usr.sbin/periodic/periodic.conf
@@ -45,6 +45,7 @@
daily_show_success="YES" # scripts returning 0
daily_show_info="YES" # scripts returning 1
daily_show_badconfig="NO" # scripts returning 2
+daily_show_empty_output="NO" # Don't notify of empty output
# 100.clean-disks
daily_clean_disks_enable="NO" # Delete files daily
@@ -208,6 +209,7 @@
weekly_show_success="YES" # scripts returning 0
weekly_show_info="YES" # scripts returning 1
weekly_show_badconfig="NO" # scripts returning 2
+weekly_show_empty_output="NO" # Don't notify of empty output
# 310.locate
weekly_locate_enable="YES" # Update locate weekly
@@ -240,6 +242,7 @@
monthly_show_success="YES" # scripts returning 0
monthly_show_info="YES" # scripts returning 1
monthly_show_badconfig="NO" # scripts returning 2
+monthly_show_empty_output="NO" # Don't notify of empty output
# 200.accounting
monthly_accounting_enable="YES" # Login accounting
@@ -259,6 +262,7 @@
security_show_success="YES" # scripts returning 0
security_show_info="YES" # scripts returning 1
security_show_badconfig="NO" # scripts returning 2
+security_show_empty_output="NO" # Don't notify of empty output
# These options are used by the security periodic(8) scripts spawned in
# daily and weekly 450.status-security.
diff --git a/usr.sbin/periodic/periodic.sh b/usr.sbin/periodic/periodic.sh
--- a/usr.sbin/periodic/periodic.sh
+++ b/usr.sbin/periodic/periodic.sh
@@ -98,7 +98,7 @@
# set, assume the user didn't really want us to muck with it (it's a
# README file or has been disabled).
-success=YES info=YES badconfig=NO empty_output=YES # Defaults when ${run}_* aren't YES/NO
+success=YES info=YES badconfig=NO empty_output=NO # Defaults when ${run}_* aren't YES/NO
for var in success info badconfig empty_output; do
case $(eval echo "\$${arg##*/}_show_$var") in
[Yy][Ee][Ss]) eval $var=YES;;
@@ -144,7 +144,7 @@
done
done
if [ $empty = TRUE ]; then
- if [ $empty_output = TRUE ]; then
+ if [ $empty_output = YES ]; then
[ $processed = 1 ] && plural= || plural=s
echo "No output from the $processed file$plural processed"
fi

File Metadata

Mime Type
text/plain
Expires
Thu, Nov 12, 7:04 PM (7 h, 51 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41681758
Default Alt Text
D61435.1794510299.diff (3 KB)

Event Timeline