LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices



Reply
 
Search this Thread
Old 07-26-2005, 01:38 PM   #1
bigdog0007
LQ Newbie
 
Registered: May 2005
Location: NC
Posts: 26

Rep: Reputation: 15
reboot vs poweroff???


Hey guys ... I hope this is a quick fix

I wrote a menu script that is working great except for 1 option...(drumroll)... poweroff... below is segment of the script to compare.

Things to note:
The users shell is pointing at the script(security reasons)
A copy of the commands are in the home dir
The reboot and exit work just fine
The poweroff command just blinks and goes right back to the menu

Shutdown)
date>~/tmp/outputtext.tmp
echo "This CLS is now shutting down!">>~/tmp/outputtext.tmp
cat ~tmp/outputtext.tmp>>~/tmp/menuoutput.tmp
dialog --title "Shutdown" --backtitle "Menu for running diagnostics \
on this CLS " --textbox ~/tmp/outputtext.tmp 7 40
clear
/home/clsguest/bin/poweroff;;
#
Reboot)
date>~/tmp/outputtext.tmp
echo "This CLS is now going to Reboot!">>~/tmp/outputtext.tmp
cat ~tmp/outputtext.tmp>>~/tmp/menuoutput.tmp
dialog --title "Reboot" --backtitle "Menu for running diagnostics \
on this CLS " --textbox ~/tmp/outputtext.tmp 7 40
clear
/home/clsguest/bin/reboot -n;;
#
Exit)
date>~/tmp/outputtext.tmp
echo "Thank You for Using CommLogix!">>~/tmp/outputtext.tmp
cat ~/tmp/outputtext.tmp>>~/tmp/menuoutput.tmp
dialog --title "EXIT" --backtitle "Menu for running diagnostics \
on this CLS " --textbox ~/tmp/outputtext.tmp 7 35
clear
exit;;




Thanks in advance for your help
 
Old 07-26-2005, 01:59 PM   #2
jtshaw
Senior Member
 
Registered: Nov 2000
Location: Seattle, WA USA
Distribution: Ubuntu @ Home, RHEL @ Work
Posts: 3,892
Blog Entries: 1

Rep: Reputation: 66
My guess the problem is in the poweroff executable... have you tried just running it as that user and seeing what it spits out?
 
Old 07-26-2005, 02:07 PM   #3
bigdog0007
LQ Newbie
 
Registered: May 2005
Location: NC
Posts: 26

Original Poster
Rep: Reputation: 15
Thanks for the quick responce

The reason for changing the users shell is to keep the user from having any interaction with the command line... however i did change the users shell back to /bin/bash and can run the command from command line ...

PS... when I run the menu script as root everything works fine.
 
Old 08-02-2005, 10:15 PM   #4
bigdog0007
LQ Newbie
 
Registered: May 2005
Location: NC
Posts: 26

Original Poster
Rep: Reputation: 15
I guess this is more or less a bump ... can anyone give me any ideas what I can do to get it to shutdown correctly?
 
Old 09-16-2005, 03:48 AM   #5
shazam75
Member
 
Registered: Oct 2004
Location: Australia, Brisbane
Distribution: Gentoo
Posts: 296

Rep: Reputation: 30
can u try:

/sbin/telinit 0

instead of shutdown.

Regards
Shelton.
 
  


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
reboot/poweroff how? demmylls Linux - General 2 08-13-2009 10:52 AM
enabling poweroff/reboot for user YBA^[x] Slackware 11 12-13-2004 03:04 AM
poweroff reboot launcher for xfce w/ KDM? r_jensen11 Linux - Software 2 01-17-2004 05:00 PM
SuSE 8.2 Will Not Poweroff, Shutdown, Reboot, Halt... whiskeypriest Linux - Newbie 4 09-18-2003 10:29 AM
family access to command poweroff & reboot pixelV Slackware 12 02-27-2003 04:18 PM


All times are GMT -5. The time now is 01:49 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration