From d8300f0a9ade9e9f14ed806b9db0459f53e8b2e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Cljm42=E2=80=9D?= <“larry_meaney@iname.com”> Date: Thu, 28 May 2026 08:26:07 -0700 Subject: [PATCH] fix: create boot logs directory before syslog writes --- emhttp/plugins/dynamix/scripts/rsyslog_config | 1 + etc/rc.d/rc.6 | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/emhttp/plugins/dynamix/scripts/rsyslog_config b/emhttp/plugins/dynamix/scripts/rsyslog_config index a8ffb3fc5a..d630fc8276 100755 --- a/emhttp/plugins/dynamix/scripts/rsyslog_config +++ b/emhttp/plugins/dynamix/scripts/rsyslog_config @@ -50,6 +50,7 @@ fi # mirror syslog to boot drive if [[ -n $syslog_flash ]]; then + mkdir -p /boot/logs if ! grep -q '^\$template flash,' $ETC; then sed -ri '/^#\$UDPServerRun [0-9]+.*$/a$template flash,"/boot/logs/syslog"' $ETC fi diff --git a/etc/rc.d/rc.6 b/etc/rc.d/rc.6 index 9f0cd85b45..bd22788df8 100755 --- a/etc/rc.d/rc.6 +++ b/etc/rc.d/rc.6 @@ -219,7 +219,7 @@ if [[ ! -f /boot/logs/syslog && -z $MIRROR && -z $COPY ]]; then SIZE=$(($(/bin/stat -c%s /var/log/syslog)*2)) if [[ $AVAIL -ge $SIZE ]]; then log "Saving syslog to boot drive" - /bin/cp -f /var/log/syslog /boot/logs/syslog + /bin/mkdir -p /boot/logs && /bin/cp -f /var/log/syslog /boot/logs/syslog fi fi