SUSE / openSUSE This Forum is for the discussion of Suse Linux. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
10-11-2005, 12:23 PM
|
#1
|
Member
Registered: Jan 2004
Posts: 409
Rep:
|
script at the shutdown
Hello
Does anyone know if we can execute a script (automatically) when
we are giving the command shutdown ?
|
|
|
10-11-2005, 12:30 PM
|
#2
|
Member
Registered: Nov 2004
Location: Texas
Distribution: openSUSE 10.3, Yoper Linux 3.0 , Arch Linux 2007.08
Posts: 253
Rep:
|
I haven't done this myself, but you should be able to simply hook a call to your desired script into one of the existing scripts in /etc/rc.d/rc6.d. The scripts there are called whenever SuSE shifts to run level 6, which is reboot or shutdown. I am sure that alternately you can just add another script to /etc/rc.d/rc6.d, but I am not sure how to ensure that it will execute. Simply adding to an existing script should be foolproof. Let us know if this works.
|
|
|
10-11-2005, 01:27 PM
|
#3
|
Senior Member
Registered: Oct 2005
Location: Horgau, Germany
Distribution: Manjaro KDE, Win 10
Posts: 2,199
Rep:
|
Hello!
This is not quite correct:
Runlevel 6 is Reboot
Runlevel 0 is Shutdown
You can add your script via YaST.
Greetings
|
|
|
10-11-2005, 01:30 PM
|
#4
|
Senior Member
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Rep:
|
What do you want the script to do? Just curious.
|
|
|
10-15-2005, 08:43 AM
|
#5
|
Member
Registered: Jan 2004
Posts: 409
Original Poster
Rep:
|
my script has to remove a psecific line form /etc/fstab in the shutdown or reboot process.
|
|
|
All times are GMT -5. The time now is 08:10 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|