LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 04-08-2005, 05:24 PM   #1
acidjuice
Member
 
Registered: Jan 2005
Location: a tiny spot on the iceberg
Distribution: Slackware 10.1 (dropline 2.10, kernel 2.6.11.6)
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:
Code:
#! /bin/sh
# SHUTDOWN Script

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

esac
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'.

thanks,

aj.
 
Old 04-08-2005, 05:28 PM   #2
gbonvehi
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, 07:00 PM   #3
acidjuice
Member
 
Registered: Jan 2005
Location: a tiny spot on the iceberg
Distribution: Slackware 10.1 (dropline 2.10, kernel 2.6.11.6)
Posts: 320

Original Poster
Rep: Reputation: 30
thanks gbonvehi,

i figured someone could actually tell me this could damage something

cheers,

aj.
 
Old 04-09-2005, 05:19 PM   #4
zborgerd
Member
 
Registered: Mar 2004
Distribution: Slackware / Dropline GNOME
Posts: 378

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

http://cvs.gnome.org/viewcvs/gnome-p...v=1.3&view=log
http://cvs.gnome.org/viewcvs/gnome-p...v=1.3&view=log


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


Reply


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 04:04 PM
script at the shutdown dominant SUSE / openSUSE 4 10-15-2005 07:43 AM
Shutdown script Hexane Mandriva 7 01-28-2005 01:36 AM
shutdown script Zolan Linux - Newbie 2 10-16-2004 09:02 PM
Editing Shutdown Script coolamit78 Red Hat 2 09-14-2003 06:22 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 04:37 PM.

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