Fedora Linux Support Community & Resources Center
  #1  
Old 4th May 2012, 02:51 PM
kalzoubi Offline
Registered User
 
Join Date: Apr 2011
Posts: 27
linuxfirefox
How to prompt user to manually shutdown system

Hi,

I am using "init 0" command to shutdown the system within my code. How can I modify this command (or other commands) to prompt the user to power off the system manually once it is safe to do so.

Thanks.
Reply With Quote
  #2  
Old 7th May 2012, 02:55 PM
kalzoubi Offline
Registered User
 
Join Date: Apr 2011
Posts: 27
linuxfirefox
Re: How to prompt user to manually shutdown system

I tried to solve the problem by adding the following script in /etc/init.d, then creating two symbolic links with name K99scriptname to it in /etc/rc0.d and /etc/rc6.d. However, the script is not being executed at shutdown.

#!/bin/sh
clear
echo "============================================= =="
echo "=== ==="
echo "=== Please turn off the power now ! ==="
echo "=== ==="
echo "============================================= =="
while :
do
sleep 1
done
Reply With Quote
  #3  
Old 7th May 2012, 03:28 PM
DBelton Offline
Administrator
 
Join Date: Aug 2009
Posts: 7,320
linuxfirefox
Re: How to prompt user to manually shutdown system

try putting your script in /usr/lib/systemd/system-shutdown/
Reply With Quote
Reply

Tags
manually, prompt, shutdown, user

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Howto manually shutdown? docmccoy Using Fedora 1 20th June 2009 12:48 AM
Users not showing in logon prompt/failure to shutdown/restart etc... my800stuff Using Fedora 1 16th December 2008 03:36 PM
login prompt during shutdown - normal behavior? DennyCrane Using Fedora 2 28th May 2008 02:23 PM
prompt or not prompt for password depending on user & client powah Security and Privacy 0 21st June 2007 04:28 AM


Current GMT-time: 07:21 (Tuesday, 22-07-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat