Koozali.org: home of the SME Server

Shut Down per keyboard

Guido

Shut Down per keyboard
« 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 !!!

Harris

Re: Shut Down per keyboard
« Reply #1 on: November 28, 2002, 12:12:37 AM »
Try typing "reboot -h now" (as root)

Ray

Re: Shut Down per keyboard
« Reply #2 on: November 28, 2002, 12:15:35 AM »
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.

Harris

Re: Shut Down per keyboard
« Reply #3 on: November 28, 2002, 12:18:07 AM »
Hope you can type blind :)

root -> enter -> root-password -> shutdown -h now

Harris

Re: Shut Down per keyboard
« Reply #4 on: November 28, 2002, 12:18:55 AM »
Forgot some enters :)

root -> enter -> root-password -> enter -> shutdown -h now -> enter

Ray

Re: Shut Down per keyboard
« Reply #5 on: November 28, 2002, 12:21:10 AM »
okay. that is also a way.   :-)))

guestHH

Re: Shut Down per keyboard
« Reply #6 on: November 28, 2002, 12:35:45 AM »
Ctrl-Alt_Del will do, if you didn't disable it.

Ray

Re: Shut Down per keyboard
« Reply #7 on: November 28, 2002, 12:37:22 AM »
the computer makes a reboot and no shut down. thats the prob.

Rich Lafferty

Re: Shut Down per keyboard
« Reply #8 on: November 28, 2002, 01:21:37 AM »
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

Ray

Re: Shut Down per keyboard
« Reply #9 on: November 28, 2002, 01:26:21 AM »
Yeahhhhhoooooo.
Many THX    Rich    :-)))

Jáder Marasca

Re: Shut Down per keyboard
« Reply #10 on: November 28, 2002, 03:33:20 AM »
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

Guido

Re: Shut Down per keyboard
« Reply #11 on: November 30, 2002, 12:58:43 AM »
THX also Jáder for the hint. Will see if i can find the file....

Guido

Re: Shut Down per keyboard
« Reply #12 on: November 30, 2002, 01:08:04 AM »
So,

can't find the file. In the .bashrc file is no entry.  mmhhhhh

Jáder Marasca

Re: Shut Down per keyboard
« Reply #13 on: November 30, 2002, 03:01:14 AM »
I´ll do a google search and return to you ASAP!

Jáder Marasca

Re: Shut Down per keyboard
« Reply #14 on: November 30, 2002, 03:07:34 AM »
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

Jáder Marasca

Re: Shut Down per keyboard = FOUND!
« Reply #15 on: November 30, 2002, 03:12:10 AM »
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!!

Guido

Re: Shut Down per keyboard = FOUND!
« Reply #16 on: November 30, 2002, 05:28:38 PM »
Many THX Jáder.  
( 5 Minutes search ?. Damn   :-))  )


Guido

stephen noble

Re: Shut Down per keyboard ::RPM
« Reply #17 on: December 04, 2002, 05:30:43 PM »
>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

flipp

ctraltdel Shutdown
« Reply #18 on: April 03, 2004, 05:48:33 AM »
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?

bobk

Shut Down per keyboard
« Reply #19 on: April 04, 2004, 04:25:28 AM »
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.