Problem starting WiFi network adapter

Using applications, configuring, problems
Post Reply
Message
Author
edwin.evans
Posts: 60
Joined: Thu 15 Nov 2012, 16:06

Problem starting WiFi network adapter

#1 Post by edwin.evans »

Hi,

I want to start my WiFi adapter without using the connect wizard. I have a script to do this now using ifconfig and iwconfig. The script works fine but the problem is that if I put the script in /etc/init.d it doesn't work. I can put it in /root/Startup and it is OK, but I need to load it as part of my daemon startup flow.

Any idea why it won't work when I put it in /etc/init.d and how to make this work?

Thanks!
-Ed

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#2 Post by rcrsn51 »

The scripts in /etc/init.d must have a very specific structure.

Instead, try putting the code from the script in /etc/rc.d/rc.local

edwin.evans
Posts: 60
Joined: Thu 15 Nov 2012, 16:06

#3 Post by edwin.evans »

rcrsn51 wrote:The scripts in /etc/init.d must have a very specific structure.

Instead, try putting the code from the script in /etc/rc.d/rc.local
Thanks! I will try this. What do you mean by a specific structure?

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#4 Post by rcrsn51 »

edwin.evans wrote: What do you mean by a specific structure?
Have you looked at any of them? They all have a "case" structure with a "start" and a "stop" section.

edwin.evans
Posts: 60
Joined: Thu 15 Nov 2012, 16:06

#5 Post by edwin.evans »

rcrsn51 wrote:
edwin.evans wrote: What do you mean by a specific structure?
Have you looked at any of them? They all have a "case" structure with a "start" and a "stop" section.
Yes, I see that. I am putting the code to start the adapter in the start function. It seems like it only works if it runs after rc.network.

I see the README in the directory you pointed me to mentions that rc.network is run as a parallel process. Perhaps that is the issue then.

Thanks!

edwin.evans
Posts: 60
Joined: Thu 15 Nov 2012, 16:06

#6 Post by edwin.evans »

edwin.evans wrote:
rcrsn51 wrote:
edwin.evans wrote: What do you mean by a specific structure?
Have you looked at any of them? They all have a "case" structure with a "start" and a "stop" section.
Yes, I see that. I am putting the code to start the adapter in the start function. It seems like it only works if it runs after rc.network.

I see the README in the directory you pointed me to mentions that rc.network is run as a parallel process. Perhaps that is the issue then.

Thanks!
Though I'm having a weird problem that I moved rc.network out of rc.d to be sure that the setup wizard wouldn't do anything but now I can't get it back. It seems to get deleted whenever I restart but I can't figure out why that is happening. I copy it there and then when I reboot it is gone.

Post Reply