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