reboot vs poweroff???
Hey guys ... I hope this is a quick fix :p
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 :) |
My guess the problem is in the poweroff executable... have you tried just running it as that user and seeing what it spits out?
|
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. |
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?
|
can u try:
/sbin/telinit 0 instead of shutdown. Regards Shelton. |
All times are GMT -5. The time now is 07:00 PM. |