LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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 11-11-2005, 08:23 PM   #1
BrianK
Senior Member
 
Registered: Mar 2002
Location: Los Angeles, CA
Distribution: Debian, Ubuntu
Posts: 1,334

Rep: Reputation: 51
Problems getting a startup script starting at the correct time


I have a pretty simple startup script:
Code:
#! /bin/sh
#
# Author: BK
#
# /etc/init.d/queueup
#
# System startup script for Dr Queue
#
### BEGIN INIT INFO
# Provides: queueup
# Required-Start: $network $nfs $ypbind
# Required-Stop:
# Default-Start: 3 5
# Default-Stop:
# Description: Logs us into Dr Queue
### END INIT INFO

. /etc/rc.status

echo "Logging into dr queue"
su ivan -c slave

rc_exit
but when I run insserv on it, it links up in the rc dirs as S07queueup - before nfs & ypbind - and therefore does not work being that it has no idea who "ivan" is (an nis user), nor where the contents of slave are (on an nfs mount).

I tried manually changing S07 to S99, but it still loads at the same time during bootup - before nfs & ypbind.

What am I doing wrong?

Thanks
 
Old 11-12-2005, 05:07 AM   #2
/bin/bash
Senior Member
 
Registered: Jul 2003
Location: Indiana
Distribution: Mandrake Slackware-current QNX4.25
Posts: 1,802

Rep: Reputation: 47
Quote:
I tried manually changing S07 to S99, but it still loads at the same time during bootup - before nfs & ypbind.
Did you change to S99 in both /etc/rc5.d and /etc/rc3.d ?

Also there is a way to tell inserv what number you want the service to have but I can't remember what it is now. Using chkconfig you would have a line like this in the script:
# chkconfig 35 99
Which told chkconfig to start the service in runlevels 3 and 5 and give it the number of S99 or K99.
 
Old 11-12-2005, 12:34 PM   #3
BrianK
Senior Member
 
Registered: Mar 2002
Location: Los Angeles, CA
Distribution: Debian, Ubuntu
Posts: 1,334

Original Poster
Rep: Reputation: 51
Quote:
Originally posted by /bin/bash
Did you change to S99 in both /etc/rc5.d and /etc/rc3.d ?

Also there is a way to tell inserv what number you want the service to have but I can't remember what it is now. Using chkconfig you would have a line like this in the script:
# chkconfig 35 99
Which told chkconfig to start the service in runlevels 3 and 5 and give it the number of S99 or K99.
I only changed in 3, but that's the runlevel of this machine.

I didn't think you used chkconfig with Suse's LSB?

edit: nevermind about that last line - I see that's what you're saying.

Last edited by BrianK; 11-12-2005 at 12:44 PM.
 
Old 11-13-2005, 05:15 AM   #4
/bin/bash
Senior Member
 
Registered: Jul 2003
Location: Indiana
Distribution: Mandrake Slackware-current QNX4.25
Posts: 1,802

Rep: Reputation: 47
Maybe put a line in the script like this:

while [ -z "`pidof nfsd`" ] ;do
sleep 1
done

<edit> That may not work if nfs and ypbind are not starting in background but maybe this might work:

[ -z "`pidof nfsd`" ] && /etc/init.d/nfs start
[ -z "`pidof ypbind`" ] && /etc/init.d/ypbind start


Last edited by /bin/bash; 11-13-2005 at 05:20 AM.
 
  


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
Problems in running a script as a daemon at startup fahad26 Programming 5 03-07-2012 07:24 AM
starting script on startup darklandz Linux - Newbie 4 06-05-2005 02:51 AM
starting the script at boot time hudy_rob Mandriva 4 12-09-2004 10:29 AM
Starting Script on startup chrisfirestar Linux - General 5 12-02-2003 12:12 AM
how can I get/make a proper squid daemon startup script for boot time binkybuckle Debian 0 07-05-2003 07:58 PM

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

All times are GMT -5. The time now is 02:22 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