Koozali.org: home of the SME Server
Legacy Forums => General Discussion (Legacy) => Topic started by: Guido on November 27, 2002, 10:05:43 PM
-
Hi!
I want my SME 5.5 server to be shut down per keyboard. (CTRL-ALT-DEL).
At the moment, the server makes a simple reboot.
What steps need to be taken ?
THX in advance !!!
-
Try typing "reboot -h now" (as root)
-
Thx Harris,
but i don't have a monitor installed and also don't want to ssh onto the server.
Just the old way with the keyboard.
IP-COP does a shut-down when pressing CTRL-ALT-DEL.
-
Hope you can type blind :)
root -> enter -> root-password -> shutdown -h now
-
Forgot some enters :)
root -> enter -> root-password -> enter -> shutdown -h now -> enter
-
okay. that is also a way. :-)))
-
Ctrl-Alt_Del will do, if you didn't disable it.
-
the computer makes a reboot and no shut down. thats the prob.
-
Well, you can shutdown with "shutdown -h now"!
(Just kidding!)
Make a custom template for /etc/inittab:
mkdir -p /etc/e-smith/templates-custom/etc/inittab
cd /etc/e-smith/templates-custom/etc/inittab
Start with the existing init ctrlaltdel template:
cp /etc/e-smith.templates/etc/inittab/30ctrlaltdel .
Now edit /etc/e-smith/templates-custom/etc/inittab/30ctrlaltdel in
your favorite text editor, changing "shutdown -t3 -r now" to
"shutdown -t3 -h now".
Then expand the template:
/sbin/e-smith/expand-template /etc/inittab
And tell init to reread it:
telinit q
Now ctrl-alt-del should shut the machine down.
Cheers,
--Rich
-
Yeahhhhhoooooo.
Many THX Rich :-)))
-
There is a way... edit a .XXX file (I can remember the file right now!) maybe if you look at root of IPCOP (if you can!) it´s a hidden file something like .bash or whatever...
There is a line saying what CTRL ALT DEL do... just change it to -h instead of -r
-
THX also Jáder for the hint. Will see if i can find the file....
-
So,
can't find the file. In the .bashrc file is no entry. mmhhhhh
-
I´ll do a google search and return to you ASAP!
-
A quick search returned this... I have no access to a SME or a linux server right now... so just try yourself and return!
http://www.uwsg.iu.edu/hypermail/linux/kernel/9802.2/0407.html
-
I found it! Finally... almost 5 minute search!
"
Rebooting the system
If possible you should make rebooting the system more difficult, by default almost all Linux distributions have ctrl-alt-del enabled so that it reboots the machines. However, unlike Windows, this is not necessary. In Linux you can easily control the behavior of ctrl-alt-del, simply by editing the /etc/inittab file:
ca::ctrlaltdel:/sbin/shutdown -t3 -r now
"
from : http://www.seifried.org/lasg/system/
I presume this will work!!
-
Many THX Jáder.
( 5 Minutes search ?. Damn :-)) )
Guido
-
>Now ctrl-alt-del should shut the machine down.
>Cheers,
>--Rich
thanks rich, this saves me 20 seconds every other night :-)
and in case your instructions are lost i made it an rpm
http://www.dungog.net/sme/files/
dungog-controlaltdel-shutdown-0.1-1.noarch.rpm
regards
stephen noble
-
I have made the suggested change to the /etc/inittab file and modified the shutdown command to not include -r switch. I assume that this was the only change required.
Is there anything else that needs to be changed or have I insufficiently changed the shutdown comand?
-
In SME 6.0 the template numbers have changed. So using Richard Lafferty's HowTo (on the first page of this thread) will not work without changing the template fragment number as shown below. Installing Steven Noble's RPM results in /etc/inittab[48]: duplicate ID field "ca"
On 6.0 you need to modify Richard Lafferty's HowTo as follows:
Make a custom template for /etc/inittab:
mkdir -p /etc/e-smith/templates-custom/etc/inittab
cd /etc/e-smith/templates-custom/etc/inittab
Start with the existing init ctrlaltdel template:
cp /etc/e-smith.templates/etc/inittab/15ctrlaltdel .
Now edit /etc/e-smith/templates-custom/etc/inittab/15ctrlaltdel in
your favorite text editor, changing "shutdown -t3 -r now" to
"shutdown -t3 -h now".
Then expand the template:
/sbin/e-smith/expand-template /etc/inittab
And tell init to reread it:
telinit q
Now ctrl-alt-del should shut the machine down.