Jeremy Huntwork wrote:
[EMAIL PROTECTED] wrote:

+umount /.cdrom
+echo -n "Remove the CD from the drive and press Enter..."
>
Just a couple of comments on the eject setup.

Might the process be smoother if we used the 'eject' program?:
ftp://metalab.unc.edu/pub/Linux/utils/disk-management/eject-2.1.0.tar.gz

Yes, I know it, and it is one of those things I done here but not committed (the other thing is kexec, I think I will revert it because it is no longer needed).


So, at boot we capture the device that the cd is in, and after 'umount /.cdrom' we do something like:

if [ `eject /dev/xxx` ] ; then
    echo -n "Remove the CD from the drive and press Enter..."
    read Enter
fi

I'd prefer something like this that doesn't always break the shutdown process and require manual intervention. After all, what happens if you just want to reboot the machine remotely (for whatever reason), or halt it? And you get stuck on the read Enter?

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?

As for not hard-coding /dev/xxx, I will solve this today with the /dev/lfs-cd symlink. Then things will be as simple as:

echo "/dev/lfs-cd" | cpio -p -L /dev/shm
...
eject /dev/lfs-cd

The obstacle is that eject doesn't compile against klibc. Probably the solution is to make post-pivot_root part glibc-based.

--
Alexander E. Patrakov
--
http://linuxfromscratch.org/mailman/listinfo/livecd
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page

Reply via email to