Quote Originally Posted by Jimmy
OK, this is what I did:
.....
CD no longer ejects, but it still tells the user to remove the cd and press return.

I can live with the message being displayed, but it would be nice to have the 'pressing return' removed, so a reboot can be done automatically.

Any info on how to do this is much appreciated.

Greetz

Jimmy
I saw your post and decided to do some investigating. First I checked to see how Knoppix shutsdown. In a typical Knoppix system, runlevel 2 is root console access & runlevel 5 is for Full X enviornment. In a typical *nix system, runlevel 0 is for halting the system and & runlevel 6 is for rebooting. So I first went to /etc/rc6.d and noticed that it calls the script /etc/init.d/knoppix-reboot which contains the commands for killing the processes, unmounting the drives & rebooting the system. I also looked at /etc/rc0.d/knoppix-halt & it is very similar to knoppix-reboot. The last command in either script is to reboot or halt the machine. With that in mind I inspect the halt command which is a link to /sbin/init. I use the folloing command to get ascii strings from the binary.
Code:
strings /sbin/init
I dumps a whole lot of ascii to the screen and about 50% down it shows the following text
Code:
[1;31mCan't unmount CD yet...
[0;39m
[1;36mCan't unmount CD, please reset.
[0;39m
[1;36mPlease remove CD, close cdrom drive and hit return.
[1;39m
[1;34mShutdown complete.
So this proves that it is the init program and is displaying the "hit return" message. This also proves that the Knoppix developers are using a modified init.
This site http://developer.linuxtag.net/knoppix/sources/ is the archive of all the custom knoppix code. So I downloaded http://developer.linuxtag.net/knoppi....84-186.tar.gz & extracted it to a temp directory. I used grep to determin the location of the hit return code.
James@micro1 ~/knoptest/sysvinit-knoppix-2.84/src
$ grep -R remove src/
src/halt.c: char *msg1="Please remove CD, close cdrom drive and hit return.";
src/init.c: * The entries that do not belong here at all are removed
src/last.c: fprintf(stderr, "Perhaps this file was removed by the "
src/last.c: * If we saw a shutdown/reboot record we can remove
This is as far as I got. I figure either the automatic reboot you are looking for is either a really simple command in a script that I overlooked or that the autoreboot is hidden somewhere in the source code. You could try to get an original sysvinit-2.84 source code package and use diff to compare the changes made.
I hope this helps.
James