From ffcdd3dd560cd2f14fecd068b294499136b25ca5 Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Tue, 22 Aug 2023 10:10:08 +0200 Subject: [PATCH] system: tweak previous --- src/etc/rc.subr.d/var | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/etc/rc.subr.d/var b/src/etc/rc.subr.d/var index 85d4a9bb2..c8c09a694 100755 --- a/src/etc/rc.subr.d/var +++ b/src/etc/rc.subr.d/var @@ -59,7 +59,9 @@ mkdir -p /var/etc # from dropping "nologin" into the directory, preventing login on # the next boot. However, do not touch the directory tree. for RUNDIR in /var/run /var/dhcpd/var/run /var/unbound/var/run; do - find ${RUNDIR} ! -type d -exec rm {} \; + if [ -d ${RUNDIR} ]; then + find ${RUNDIR} ! -type d -exec rm {} \; + fi done # setup output directory for php sessions