Re: [PATCH] do not eject USB flash drives
+ while read DEVICE MOUNT REST; do
+ if [ "${MOUNT}" == "/live/image" ]
+ then
+ echo "${DEVICE}"
+ exit 0
+ fi
+ done < /proc/mounts
wrong indenting; this is covered in the manual.
== is a bashism, use = instead.
+ [ "$(expr substr ${DEVICE} 1 2)" != "sd" ] && return 1
write the long form instead (covered in the manual):
if [ foo ]
then
bar
fi
--
Address: Daniel Baumann, Burgunderstrasse 3, CH-4562 Biberist
Email: daniel.baumann@panthera-systems.net
Internet: http://people.panthera-systems.net/~daniel-baumann/
Reply to: