[email protected] wrote:
>>> while true; do
>>> case "${1}" in
>>>
>>> -p)
>>> pidfile="${2}"
>>> shift 2
>>> ;;
>>> esac
>>> done
> Unless I'm misreading and mis-testing it, there's no break out of
> the loop;
You are not giving the whole loop:
while true; do
case "${1}" in
-p)
pidfile="${2}"
shift 2
;;
*)
if [ -n "${2}" ]; then
echo "Too many arguments"
return 1
else
break
fi
;;
esac
done
The 'break' command breaks out of the while loop. It's not the same as
C/C++.
The 'functions' file is only present for a few (currently 19 are left)
bootscripts in BLFS that have not yet been updated to LFS 7.0 syntax.
-- Bruce
--
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page