Alexander E. Patrakov wrote:
Even with the "eject" program being present, I need some delay in order
to close the drive before powering the computer off. As for the "remote
shutdown" issue, I am not sure. Maybe this is good enough:
( sleep 30 ; halt $HALTOPT ) &
echo -n "Remove the CD from the drive and press Enter..."
read ENTER
halt $HALTOPT
What's your opinion on this?
Sorry, I just realized I never replied to this. I guess that's alright,
provided you still wrap the echo and read part in a test to see if eject
actually ejects the device successfully first, and if not, then echo and
read... (ie, the program doesn't return an error). So, like this:
( sleep 30 ; halt $HALTOPT) &
if [ `eject /dev/lfs-cd` ] ; then
echo -n "Remove the CD from the drove and press Enter..."
read Enter
fi
halt $HALTOPT
To me, the above seems a little counter-intuitive, because what's
enclosed in the 'if' statements actually gets run if eject produces an
error. If I add an '!' in the brackets, then the opposite of what I
expect would happen, happens, ie, if eject run successfully, the echo
and read lines get run... Anyway... the above works how we want it.
Would that solve your problem? Or am I missing your point?
--
JH
--
http://linuxfromscratch.org/mailman/listinfo/livecd
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page