Other Help Topics :: CD-eject after shutdown.



The final line in knoppix-reboot seems to execute some short of command that finalizes the reboot
Code Sample
exec $FINALCMD $options 2>/dev/null

I have spent now 2 hours of time to figure out what that line might execute...
One thing is clear: it executes halt or reboot with some arguments. But I can't find the wait command that waits user to press any key.
CD-eject problem is now solved but this is not. ;(

Code Sample
case "$CMDLINE" in *noeject*) NOEJECT="yes";;; esac

This apparently means that you don't need to edit the file.  Try adding "noeject" to your boot options.

$FINALCMD is either /etc/init or /KNOPPIX/etc/init, depending on your setup.  This is likely a copy or symlink of /sbin/init. The options are set around line 36 (case "$0" in...), and are dependent on whether you halt or reboot.  I don't know what those options do, though....they aren't listed in the man page, so i'm guessing the init in knoppix/dsl is a custom application.

I'll try that after I get home from work. ;)
I wonder if it needs appending '--'. Like this: reboot --noeject.

I don't wanna risk and try booting now.

"noeject" in this situation is a boot option, as in something you add to your bootloader's config or enter at the "boot:" prompt in a live cd. It is not something that can be applied after the kernel has loaded.
Jeah. I just figured that out too... ;/
Now I'm at the point where's two choices to do:
Code Sample
case "$0" in
 *halt)
 exec $FINALCMD $options 2>/dev/null
 ;;
 *reboot)
 exec /sbin/shutdown -r now
 ;;
esac

That would be just what I'm looking for BUT, it says that there no /sbin/shutdown file at all. Ok it's because we have already unmounted filesystems. One thing I know is that /etc/ it left. Sooo... I must add a cp line somewhere...

Another way is to do shutdown -n (if I remember correctly) which will force reboot immediately. I wouldn't like to use that.

I've been getting "No more processes on this runlevel" even it is runlevel 6. And then it freezes there...
Maybe I'm missing some big point but doesn't it should reboot after there's no commands to execute on runlevel 6?

I'm thinking to rewrite whole script... But trying to avoid that to the last point.

Next Page...
original here.