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