LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 10-04-2010, 08:52 PM   #1
j-me
Member
 
Registered: Jan 2003
Location: des moines, ia
Distribution: suse RH
Posts: 129

Rep: Reputation: 17
run a script AFTER everything boots


Due to issues with a SAN attached FS, I need to run a mount -a after the system and runlevel services load. For some reason the SAN FS is not completely loaded after the runlevel scripts complete and therefore some of the dependent mount points do not get loaded from the fstab.
SUSE 10.2

I have a simple script that runs a sudo mount -a that works fine when I run it after everything is up. However, I need this to run automatically. I have tried creating a service and that did not work. I cannot use boot.local as that runs before the runlevel. I even tried a sleep in the script to execute it as the last service with a 5 minute sleep and that still does not work.
Anyone have another idea that will work? I'm all ears.

Thank you.

Last edited by j-me; 10-04-2010 at 09:09 PM. Reason: got it to work finally.
 
Old 10-04-2010, 09:04 PM   #2
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
Create a rclocal that runs last (Google "Suse rclocal")?

Or put in root's crontab:
Code:
@reboot /root/mountsan.sh
where /root/mountsan.sh contains "mount -a"
 
Old 10-04-2010, 09:11 PM   #3
j-me
Member
 
Registered: Jan 2003
Location: des moines, ia
Distribution: suse RH
Posts: 129

Original Poster
Rep: Reputation: 17
works now ~ overlooked

skip it. I got it to work. Put it in the right location to run. /etc/rc.d/. I updated the script in my work area but not the rc.d. Sorry my mistake. Now just need to play with the sleep time a little.

Thanks.
 
  


Reply



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
It takes 1-9 boots to run Debian Badger Debian 7 03-18-2008 05:56 PM
How do I get a script file to run automatically when linux boots? kccrusher Linux - Software 4 11-13-2006 09:55 PM
Slackware 10.2 boots to run level 1 norobro Slackware 4 02-09-2006 08:59 PM
How to setup shells to run when the server boots/shuts down Colmenares Red Hat 2 08-19-2004 04:04 PM
on Network Up Script run? On Battery power run script? v2-ncl Linux - General 0 12-08-2003 09:34 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 08:25 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
Open Source Consulting | Domain Registration