From 0171568697c70a7925ed2f1896826609e9dc5c40 Mon Sep 17 00:00:00 2001 From: Andreas Baumann Date: Thu, 25 Apr 2024 19:44:34 +0200 Subject: made newsyslog.conf a config file and not a template (needs adaption for small /var/log filesystems) --- build.sh | 2 +- config/obr/newsyslog.conf | 14 ++++++++++++++ docs/HOWTO.UPGRADE | 2 +- template/etc/newsyslog.conf | 14 -------------- 4 files changed, 16 insertions(+), 16 deletions(-) create mode 100644 config/obr/newsyslog.conf delete mode 100644 template/etc/newsyslog.conf diff --git a/build.sh b/build.sh index cc42e88..95d3adb 100755 --- a/build.sh +++ b/build.sh @@ -280,7 +280,6 @@ cp -R template/etc/pf.os $MOUNTPOINT/etc/. cp -R template/etc/syslog.conf $MOUNTPOINT/etc/. cp -R template/etc/tabs $MOUNTPOINT/etc/. chmod 0600 $MOUNTPOINT/etc/tabs/* -cp -R template/etc/newsyslog.conf $MOUNTPOINT/etc/. cp -R template/etc/ssh/sshd_config $MOUNTPOINT/etc/ssh/. cp -R template/etc/moduli $MOUNTPOINT/etc/. cp -R /usr/share/zoneinfo/Europe/Zurich $MOUNTPOINT/etc/localtime @@ -294,6 +293,7 @@ cp -R config/$HOSTNAME/networks $MOUNTPOINT/etc/. cp -R config/$HOSTNAME/pf.conf $MOUNTPOINT/etc/. cp -R config/$HOSTNAME/badhosts $MOUNTPOINT/etc/. cp -R config/$HOSTNAME/resolv.conf $MOUNTPOINT/etc/. +cp -R config/$HOSTNAME/newsyslog.conf $MOUNTPOINT/etc/. m4 -DHOSTNAME=$HOSTNAME template/etc/rc > $MOUNTPOINT/etc/rc # depending on the existence of some config files for the specific build diff --git a/config/obr/newsyslog.conf b/config/obr/newsyslog.conf new file mode 100644 index 0000000..4647bec --- /dev/null +++ b/config/obr/newsyslog.conf @@ -0,0 +1,14 @@ +# $OpenBSD: newsyslog.conf,v 1.38 2022/01/05 18:34:23 deraadt Exp $ +# +# configuration file for newsyslog +# +# logfile_name owner:group mode count size when flags +/var/cron/log root:wheel 600 3 10 * Z +/var/log/authlog root:wheel 640 7 10 168 Z +/var/log/daemon 640 5 30 * Z +/var/log/lpd-errs 640 7 10 * Z +/var/log/maillog 640 7 * 24 Z +/var/log/messages 644 5 30 * Z +/var/log/secure 600 7 30 168 Z +/var/log/wtmp 644 7 * $M1D4 B "" +/var/log/pflog 600 3 25 * ZB "pkill -HUP -u root -U root -t - -x pflogd" diff --git a/docs/HOWTO.UPGRADE b/docs/HOWTO.UPGRADE index a0faa5d..80612dc 100644 --- a/docs/HOWTO.UPGRADE +++ b/docs/HOWTO.UPGRADE @@ -21,7 +21,6 @@ sync the template directory with the files found in the vanilla OpenBSD: template/etc/boot.conf template/etc/syslog.conf - template/etc/newsyslog.conf template/etc/fstab template/etc/tabs/root template/etc/passwd @@ -45,6 +44,7 @@ those configs are really yours, sync them also with new concepts from upstream config/xxx/nsd-xxx config/xxx/relayd.conf config/xxx/resolv.conf + config/xxx/newsyslog.conf build the image diff --git a/template/etc/newsyslog.conf b/template/etc/newsyslog.conf deleted file mode 100644 index 9c7c275..0000000 --- a/template/etc/newsyslog.conf +++ /dev/null @@ -1,14 +0,0 @@ -# $OpenBSD: newsyslog.conf,v 1.38 2022/01/05 18:34:23 deraadt Exp $ -# -# configuration file for newsyslog -# -# logfile_name owner:group mode count size when flags -/var/cron/log root:wheel 600 3 10 * Z -/var/log/authlog root:wheel 640 7 * 168 Z -/var/log/daemon 640 5 30 * Z -/var/log/lpd-errs 640 7 10 * Z -/var/log/maillog 640 7 * 24 Z -/var/log/messages 644 5 30 * Z -/var/log/secure 600 7 * 168 Z -/var/log/wtmp 644 7 * $M1D4 B "" -/var/log/pflog 600 3 25 * ZB "pkill -HUP -u root -U root -t - -x pflogd" -- cgit v1.2.3-54-g00ecf