Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Slackware This Forum is for the discussion of Slackware Linux.


  Search this Thread
Old 04-08-2005, 06:24 PM   #1
Registered: Jan 2005
Location: a tiny spot on the iceberg
Distribution: Slackware 10.1 (dropline 2.10, kernel
Posts: 320

Rep: Reputation: 30
shutdown script

dear all,

i boot in init level 3 and have dropline gnome 2.10 over slack 10.1.

since gnome 2.10 needs GDM to have its sessions shutdown or reboot, i wanted to find a way to do a shutdown with a mouse click from within gnome and still boot without GDM.

therefore, i added to my panel an application launcher that launches the following script in a terminal:
#! /bin/sh

echo -n "Shutdown now (n to cancel)? "
read yn
case $yn in
	[nN]* )	echo "Shutdown canceled." ; break ;;
	* )	echo 'Shutting down system.' ; poweroff ;; 

this works wonderfully. i was just wandering if someone can tell me if this is actually something that can harm my system, since it may be considered kinda 'dirty'.


Old 04-08-2005, 06:28 PM   #2
Senior Member
Registered: Jun 2004
Location: Argentina (SR, LP)
Distribution: Slackware
Posts: 3,145

Rep: Reputation: 51
No, it's perfectly ok, I'm using one very similiar to that (I like more "if" than "case" ).
Old 04-08-2005, 08:00 PM   #3
Registered: Jan 2005
Location: a tiny spot on the iceberg
Distribution: Slackware 10.1 (dropline 2.10, kernel
Posts: 320

Original Poster
Rep: Reputation: 30
thanks gbonvehi,

i figured someone could actually tell me this could damage something


Old 04-09-2005, 06:19 PM   #4
Registered: Mar 2004
Distribution: Slackware / Dropline GNOME
Posts: 378

Rep: Reputation: 30
If you'd really like to try some hackery...

You can probably put that code back into the gnome-panel. In fact, if there is enough of a demand, we might patch it back in to Dropline (no promises).


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
startup and shutdown script android6011 Slackware 3 11-03-2005 05:04 PM
script at the shutdown dominant SUSE / openSUSE 4 10-15-2005 08:43 AM
Shutdown script Hexane Mandriva 7 01-28-2005 02:36 AM
shutdown script Zolan Linux - Newbie 2 10-16-2004 10:02 PM
Editing Shutdown Script coolamit78 Red Hat 2 09-14-2003 07:22 AM > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 03:09 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration