Search Members Help

» Welcome Guest
[ Log In :: Register ]

Mini-ITX Boards Sale, Fanless BareBones Mini-ITX, Bootable 1G DSL USBs, 533MHz Fanless PC <-- SALE $200 each!
Get The Official Damn Small Linux Book. DSL Market , Great VPS hosting provided by Tektonic
Pages: (4) </ 1 2 [3] 4 >/

[ Track this topic :: Email this topic :: Print this topic ]

reply to topic new topic new poll
Topic: CD-eject after shutdown., How do I disable it?< Next Oldest | Next Newest >
Zucca Offline





Group: Members
Posts: 524
Joined: Feb. 2006
Posted: June 14 2006,02:19 QUOTE

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. ;(


--------------
Do you have it? - http://dy.fi/mak
Back to top
Profile PM WEB ICQ MSN 
mikshaw Offline





Group: Members
Posts: 4856
Joined: July 2004
Posted: June 14 2006,03:27 QUOTE

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.


--------------
http://www.tldp.org/LDP/intro-linux/html/index.html
Back to top
Profile PM WEB 
Zucca Offline





Group: Members
Posts: 524
Joined: Feb. 2006
Posted: June 14 2006,06:41 QUOTE

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.


--------------
Do you have it? - http://dy.fi/mak
Back to top
Profile PM WEB ICQ MSN 
mikshaw Offline





Group: Members
Posts: 4856
Joined: July 2004
Posted: June 14 2006,14:55 QUOTE

"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.

--------------
http://www.tldp.org/LDP/intro-linux/html/index.html
Back to top
Profile PM WEB 
Zucca Offline





Group: Members
Posts: 524
Joined: Feb. 2006
Posted: June 14 2006,17:49 QUOTE

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.


--------------
Do you have it? - http://dy.fi/mak
Back to top
Profile PM WEB ICQ MSN 
17 replies since June 12 2006,08:19 < Next Oldest | Next Newest >

[ Track this topic :: Email this topic :: Print this topic ]

Pages: (4) </ 1 2 [3] 4 >/
reply to topic new topic new poll
Quick Reply: CD-eject after shutdown.

Do you wish to enable your signature for this post?
Do you wish to enable emoticons for this post?
Track this topic
View All Emoticons
View iB Code