LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Suse/Novell
User Name
Password
Suse/Novell This Forum is for the discussion of Suse Linux.

Notices

Reply
 
LinkBack Search this Thread
Old 03-11-2006, 06:57 AM   #1
cccc
Senior Member
 
Registered: Sep 2003
Distribution: Debian Squeeze / Wheezy
Posts: 1,436

Rep: Reputation: 38
start own script during the startup automatically


hi

my system is opensuse 10.0
I have a wpasupplicant startup script und I put it into /etc/init.d

now I can start it manually:
Code:
# /etc/init.d/wpasupplicant start

I'd like to start it automatically during the startup
so I've done following:
Code:
# cd /etc/init.d
linux:/etc/init.d # ln -s  wpasupplicant /etc/init.d/rc5.d/S25wpasupplicant
and over yast -> system -> runlevel editor activated.
but it won't start automatically !

what's wrong and howto solve this problem ?

kind regards
cccc

Last edited by cccc; 03-11-2006 at 08:33 AM.
 
Old 03-11-2006, 07:41 AM   #2
reddazz
Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 70
Try doing
Code:
#chkconfig /etc/init.d/wpasupplicant
#chkconfig wpasupplicant on
If that doesn't work then you'll have to create your own start and kill symlinks to /etc/init.d/wpasupplicant in /etc/rc.d/rcX.d. You can also put the script in /etc/init.d/boot.local.
 
Old 03-11-2006, 07:47 AM   #3
cccc
Senior Member
 
Registered: Sep 2003
Distribution: Debian Squeeze / Wheezy
Posts: 1,436

Original Poster
Rep: Reputation: 38
Code:
# chkconfig /etc/init.d/wpasupplicant
/etc/init.d/wpasupplicant: unknown service
# chkconfig wpasupplicant on
insserv: script wpasupplicant: service wpa already provided!
insserv: exiting now!
/sbin/insserv failed, exit code 1
Code:
# cd /etc/init.d
linux:/etc/init.d # ln -s  wpasupplicant /etc/init.d/rc5.d/S25wpasupplicant
 
Old 03-11-2006, 08:08 AM   #4
reddazz
Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 70
Sorry the syntax in my first post was not right. Try
Code:
# chkconfig --add /etc/init.d/wpasupplicant
 
Old 03-11-2006, 08:18 AM   #5
cccc
Senior Member
 
Registered: Sep 2003
Distribution: Debian Squeeze / Wheezy
Posts: 1,436

Original Poster
Rep: Reputation: 38
Code:
linux:~ # chkconfig --add /etc/init.d/wpasupplicant
/etc/init.d/wpasupplicant: unknown service
/etc/init.d/wpasupplicant: not a runlevel service
linux:~ #
 
Old 03-11-2006, 09:07 AM   #6
reddazz
Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 70
Quote:
Originally Posted by cccc
Code:
linux:~ # chkconfig --add /etc/init.d/wpasupplicant
/etc/init.d/wpasupplicant: unknown service
/etc/init.d/wpasupplicant: not a runlevel service
linux:~ #
Ok, it seems like its not a service handled by chkconfig. Try the instructions in this article.
 
Old 03-11-2006, 09:17 AM   #7
michaelk
Moderator
 
Registered: Aug 2002
Posts: 9,919

Rep: Reputation: 338Reputation: 338Reputation: 338Reputation: 338
A script that is controlled by chkconfig requires the line
# chkconfig: 345 15 85
Look here for the meaning.
http://www.silverglass.org/rh62config/rcfiles.html
 
Old 03-11-2006, 10:54 AM   #8
cccc
Senior Member
 
Registered: Sep 2003
Distribution: Debian Squeeze / Wheezy
Posts: 1,436

Original Poster
Rep: Reputation: 38
thanks, I will try this script

Last edited by cccc; 03-11-2006 at 07:11 PM.
 
Old 03-11-2006, 07:19 PM   #9
cccc
Senior Member
 
Registered: Sep 2003
Distribution: Debian Squeeze / Wheezy
Posts: 1,436

Original Poster
Rep: Reputation: 38
it seems to work, but only if I start it manually
during the startup, it starts to late, after the network and my wirelss doesn't get the connection

Last edited by cccc; 03-12-2006 at 06:44 PM.
 
Old 03-12-2006, 06:47 PM   #10
cccc
Senior Member
 
Registered: Sep 2003
Distribution: Debian Squeeze / Wheezy
Posts: 1,436

Original Poster
Rep: Reputation: 38
perhaps wpa is needed in Required-Start: from /etc/init.d/network:

### BEGIN INIT INFO
# Provides: network
# Required-Start: $local_fs
# Should-Start: isdn
# Required-Stop:
# Should-Stop:
# Default-Start: 2 3 5
# Default-Stop:
# Description: Configure the network interfaces and set up routing
### END INIT INFO

Last edited by cccc; 03-15-2006 at 10:42 AM.
 
Old 03-13-2006, 03:12 PM   #11
michaelk
Moderator
 
Registered: Aug 2002
Posts: 9,919

Rep: Reputation: 338Reputation: 338Reputation: 338Reputation: 338
Did you configure your script to start via init.d?
You can change the start number to be less then wireless and network.
 
Old 03-13-2006, 03:40 PM   #12
cccc
Senior Member
 
Registered: Sep 2003
Distribution: Debian Squeeze / Wheezy
Posts: 1,436

Original Poster
Rep: Reputation: 38
Quote:
Originally Posted by michaelk
Did you configure your script to start via init.d?
You can change the start number to be less then wireless and network.
yep!

I've tried already with S01 - S14 before the network (network is S15), but this really doesn't work.
so I'm looking for any other solution.
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Login user automatically on system startup, and then start X locodude Linux - Security 1 02-26-2006 05:02 PM
start services at startup automatically merlin23 Linux - Newbie 8 01-28-2005 02:09 PM
how to make named start automatically at startup nazzymac *BSD 3 04-20-2004 10:58 AM
Script to automatically config eth0 at startup jhachey Linux - Networking 2 11-03-2003 02:06 AM
How can the linux OS run script automatically at startup? tommylkc Linux - Newbie 1 06-26-2002 03:09 AM


All times are GMT -5. The time now is 07:22 PM.

Main Menu
 
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
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration