From 29dd930aca617703254c03ee561b20bbec40ce84 Mon Sep 17 00:00:00 2001 From: bauen1 Date: Sat, 18 Nov 2017 18:36:45 +0100 Subject: [PATCH] Check if autorun script is a file and marked as executable --- src/minimal_rootfs/etc/04_bootscript.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/minimal_rootfs/etc/04_bootscript.sh b/src/minimal_rootfs/etc/04_bootscript.sh index 7f96329b2..1ba22b243 100755 --- a/src/minimal_rootfs/etc/04_bootscript.sh +++ b/src/minimal_rootfs/etc/04_bootscript.sh @@ -30,8 +30,9 @@ echo -e "Welcome to \\e[1mMinimal \\e[32mLinux \\e[31mLive\\e[0m (/sbin/init)" if [ -d /etc/autorun ] ; then for AUTOSCRIPT in /etc/autorun/* do + if [ -f "$AUTOSCRIPT" ] && [ -x "$AUTOSCRIPT" ]; then echo -e "Executing \\e[32m$AUTOSCRIPT\\e[0m in subshell." - sh $AUTOSCRIPT + $AUTOSCRIPT done fi