rcS: fix typhoon_h480

The typhoon has a 6011_typhoon_h480.post script that got matched as well.
Now we exclude all files that contain a dot (apparently it's not so easy
to do generic pattern matching in a portable way, but this works).
This commit is contained in:
Beat Küng 2018-10-03 13:49:59 +02:00
parent a2d1f6ddce
commit 09563c94ce
1 changed files with 14 additions and 2 deletions

View File

@ -149,9 +149,21 @@ then
fi
# Autostart ID
autostart_file=$( ls -- etc/init.d-posix/"$(param show -q SYS_AUTOSTART)"_* )
autostart_file=''
for f in etc/init.d-posix/"$(param show -q SYS_AUTOSTART)"_*
do
filename=$(basename "$f")
case "$filename" in
*\.*)
# ignore files that contain a dot (e.g. <vehicle>.post)
;;
*)
autostart_file="$f"
;;
esac
done
if [ ! -e "$autostart_file" ]; then
echo "Error: no autostart file found"
echo "Error: no autostart file found ($autostart_file)"
exit -1
fi