changeset 228:4493e364cabf

Also configure periodic when configuring a jail
author Franz Glasner <fzglas.hg@dom66.de>
date Thu, 01 Sep 2022 09:45:41 +0200
parents a7a9fd895d30
children 243dba574ad3
files sbin/fjail
diffstat 1 files changed, 16 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/sbin/fjail	Thu Sep 01 09:33:16 2022 +0200
+++ b/sbin/fjail	Thu Sep 01 09:45:41 2022 +0200
@@ -364,6 +364,8 @@
     # mountpoint
     local _mp
 
+    local _pcl
+
     _mp="$1"
 
     if [ -z "${_mp}" ]; then
@@ -405,6 +407,20 @@
     echo "Calling \"newaliases\""
     chroot "${_mp}" /usr/bin/newaliases
 
+    _pcl="${_mp}/etc/periodic.conf.local"
+    if [ ! -f "${_pcl}" ]; then
+        echo "Adjusting periodic.conf.local"
+        echo "daily_ntpd_leapfile_enable=\"NO\"" > "${_pcl}"
+        echo "daily_status_zfs_zpool_list_enable=\"NO\"" >> "${_pcl}"
+        echo "daily_status_disks_enable=\"NO\"" >> "${_pcl}"
+        echo "daily_status_uptime_enable=\"NO\"" >> "${_pcl}"
+
+        echo "security_status_chkmounts_enable=\"NO\"" >> "${_pcl}"
+        
+    else
+        echo "WARNING: \"${_pcl}\" exists already -- not changed"
+    fi
+
     command_hostid
 }