LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE
User Name
Password
SUSE / openSUSE This Forum is for the discussion of Suse Linux.

Notices


Reply
  Search this Thread
Old 10-11-2005, 12:23 PM   #1
dominant
Member
 
Registered: Jan 2004
Posts: 409

Rep: Reputation: 30
script at the shutdown


Hello

Does anyone know if we can execute a script (automatically) when
we are giving the command shutdown ?
 
Old 10-11-2005, 12:30 PM   #2
mac57
Member
 
Registered: Nov 2004
Location: Texas
Distribution: openSUSE 10.3, Yoper Linux 3.0 , Arch Linux 2007.08
Posts: 253

Rep: Reputation: 30
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.
 
Old 10-11-2005, 01:27 PM   #3
Keruskerfuerst
Senior Member
 
Registered: Oct 2005
Location: Horgau, Germany
Distribution: Manjaro KDE, Win 10
Posts: 2,199

Rep: Reputation: 164Reputation: 164
Hello!

This is not quite correct:

Runlevel 6 is Reboot
Runlevel 0 is Shutdown

You can add your script via YaST.

Greetings
 
Old 10-11-2005, 01:30 PM   #4
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
What do you want the script to do? Just curious.
 
Old 10-15-2005, 08:43 AM   #5
dominant
Member
 
Registered: Jan 2004
Posts: 409

Original Poster
Rep: Reputation: 30
my script has to remove a psecific line form /etc/fstab in the shutdown or reboot process.
 
  


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 05:04 PM
shutdown script acidjuice Slackware 3 04-09-2005 06:19 PM
Shutdown script Hexane Mandriva 7 01-28-2005 02:36 AM
shutdown script Zolan Linux - Newbie 2 10-16-2004 10:02 PM
Editing Shutdown Script coolamit78 Red Hat 2 09-14-2003 07:22 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE

All times are GMT -5. The time now is 08:10 AM.

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
Open Source Consulting | Domain Registration