From fb6f3edd0dc2f48dacf4ae98f07e0af9fe091fb9 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Sat, 11 Jan 2020 10:04:40 +0200 Subject: [PATCH] rc: Ensure file exists before source --- lib/init/rc.boot | 2 +- lib/init/rc.shutdown | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/init/rc.boot b/lib/init/rc.boot index 2a97c32..7495152 100755 --- a/lib/init/rc.boot +++ b/lib/init/rc.boot @@ -102,7 +102,7 @@ log "Activating encrypted devices (if any exist)..."; { } log "Loading rc.conf settings..."; { - . /etc/rc.conf + [ -f /etc/rc.conf ] && . /etc/rc.conf } log "Checking filesystems..."; { diff --git a/lib/init/rc.shutdown b/lib/init/rc.shutdown index 14e8409..e249e7b 100755 --- a/lib/init/rc.shutdown +++ b/lib/init/rc.shutdown @@ -6,7 +6,7 @@ PATH=/sbin:/bin:/usr/sbin:/usr/bin log "Loading rc.conf settings..."; { - . /etc/rc.conf + [ -f /etc/rc.conf ] && . /etc/rc.conf } log "Running shutdown pre hooks..."; {