Check if autorun script is a file and marked as executable

This commit is contained in:
bauen1 2017-11-18 18:36:45 +01:00
parent 470228410b
commit 29dd930aca
No known key found for this signature in database
GPG Key ID: FF0AAF5E0812BA9C

View File

@ -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