Commit 4258a99f authored by Dom Sekotill's avatar Dom Sekotill
Browse files

Check directories exist before running scripts from them

parent 5d35a41e
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -3,10 +3,10 @@
. /lib/docker-init.sh

# Source environment variables from /etc/environment.d/
source_each /etc/environment.d/*
[ -d /etc/environment.d ] && source_each /etc/environment.d/*

# Run all setup scripts in /etc/init.d/
run_all /etc/init.d/*
[ -d /etc/init.d ] && run_all /etc/init.d/*

# Run the given command or a shell
[ -n "$1" ] || set ${SHELL:=/bin/sh}