Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 11-14-2006, 10:18 PM   #1
LQ Newbie
Registered: Nov 2006
Posts: 13

Rep: Reputation: 0
/etc/rc.d/rc.local ?

Hello everyone,

I am trying to get some wireless cards working, and I want them to activate when starting Linux. I need to run modprobe ndiswrapper and iwconfig and ifconfig. Someone mentioned that the way to do this was to add the commands at the end of the /etc/rc.d/rc.local script. However, I do not have this file. I am running Suse 10.1 with kernel, and I have looked at several other machines running this distribution and they don't have it either. Is this something related to Suse 10.1, or do I just have to create the file from scratch? If I do create it on my own, will it be read automatically?

I did see a file called rc in the /etc/rc.d directory, but it described itself as a script which runs when the run level is changed. I don't think this is what I want.

Thanks for any help you can give.

Old 11-15-2006, 12:20 AM   #2
Registered: Nov 2002
Location: Lone Tree, CO
Distribution: Xubuntu Gutsy
Posts: 174

Rep: Reputation: 30
Not an answer to the question but may help

This is not a direct answer to your question, but you may want to look at wpa-supplicant [1-3] to get your wireless card working. It supports WEP, WPA, and Open keys. Also, it uses a configuration file to set up your access points that you want connect to. So it would be a lot less manual than calling iwconfig directly.

Old 11-15-2006, 12:23 AM   #3
Registered: Mar 2005
Location: Winnipeg, MB
Distribution: Raspbian, Debian, Slackware, OS X
Posts: 443
Blog Entries: 9

Rep: Reputation: 32
That is the name of one of the Slackware rc scripts, Slackware uses BSD-like init scripts whereas Suse uses SysV-like init scripts.

Taken from
Claims that the entire HOW-TO works on Suse 10.1.
Load ndiswrapper module on boot

* Click on System Icon in YaST.
* On the right pane, click on that ugly icon labelled "/etc/sysconfig Editor". This is the closest thing
Linux has to Windows registry as far as I can tell...sorry for the comparion but not sorry for calling
the label ugly! How about just "System Configuration" instead?!?!?

* On the left pane of the window, expand the selection to System | Kernel.
* Now, click on the item labelled, MODULES_LOADED_ON_BOOT
* In the right pane, enter "ndiswrapper" (again, without quotes) and click Finish.
The process you need to follow, will be similar to this I imagine. though things may be different in your version of Suse.

Last edited by truthfatal; 11-15-2006 at 12:27 AM.
Old 11-15-2006, 12:23 AM   #4
Registered: Sep 2004
Location: Florida
Distribution: Slackware, VectorLinux, FreeBSD,Xubuntu
Posts: 69

Rep: Reputation: 15
Someone correct me if I am wrong, but I believe all of the rc.* files in the rc.d directory will get executed (as long as they are executable) in alphabetical order. All you have to do is create a script file that will run the commands you need, name it rc.local, and place it in the /etc/rc.d directory. My rc.local is:
# rc.local
# This file is provided for custom initialisation because
# Admin is not encouraged to touch rc.S or rc.M.
# This file is launched on the end of entering multi user mode (2-5)

/usr/sbin/alsactl restore
since I need to restore my alsa configuration every time I reboot. Hope this helps.
Old 11-15-2006, 04:49 AM   #5
Registered: May 2003
Location: Canberra, Australia
Distribution: openSUSE 11.3
Posts: 445

Rep: Reputation: 31
SUSE uses /etc/init.d/boot.local

In SUSE 10.0, /etc/init.d/boot.local is used to start locally generated commands on bootup. It is likely to be the same in SUSE 10.1.
Old 11-15-2006, 05:10 AM   #6
Registered: Jan 2003
Posts: 56

Rep: Reputation: 15
what kind of cards are you trying to install?

There are some cards or more precisely, chipsets with native Linux drivers. From my own experimenting with wireless, if native drivers exist, you should always try them first as an alternative to ndiswrapper and Windows drivers.
Old 11-15-2006, 10:52 AM   #7
LQ Newbie
Registered: Nov 2006
Posts: 13

Original Poster
Rep: Reputation: 0
Thanks everybody! I will look into the wpa-supplicant. I'd not heard of that before. And I have looked for native drivers, which exist for the card in my desktop (though I'm having trouble installing; that's in another thread over in networking), but there are none for my friend's laptop. The closest thing is the bcm43xx driver, which has been reverse engineered and doesn't work with the bcm4318, from what I've read.

Thanks again,

Old 11-15-2006, 12:17 PM   #8
FSoftware Lover
LQ Newbie
Registered: Aug 2006
Posts: 12

Rep: Reputation: 0
In my FC5, a way that I used (Indeed, my apps doesnt work via any other methods becuase they needed that desktop were loaded before) this: /root/.kde/Autostart/
Put anything you wish (documents, executables, shell scripts (probably containing several commands for starting all your startup programs - Like my own -- note that your shell script must be executable), symlinks, ...) into that directory!
It is like windows startup directory.
Note that this is for KDE. I dont know about GNOME or any other DEs.
oh note that I am a root guy!! place your home directory instead of /root/
Old 11-15-2006, 03:03 PM   #9
Senior Member
Registered: Oct 2006
Location: Cp6uja
Distribution: Slackware on x86 and arm
Posts: 1,129
Blog Entries: 2

Rep: Reputation: 147Reputation: 147
Cool I'm not sure...

This whas more distro-specific question, not a general one?
Slackware has /etc/rc.d/rc.*
Suse has /etc/init.d/*
Mandriva has /etc/rc.[0-6]/* & /etc/init.d/*
et cetera...
any how, if you make a script in /etc/init.d You still have to register it to the system V style init via sysV konfigurator tool (KDE ship with one ...) there you designate in witch runlevel (for example above 2) you want it to start and in which then to stop ...
Man do I like slackware for the simplicity...
And yes, some directory is parsed alphabetically but the /etc/rc.<num> not the init.d ...

To figure out how this works, examine an arbitrary nice and short script in your own /etc/init.d/ and once made Your own, deploy it to the /etc/rc.<runlevels>/ with the KDE KsysV.
Old 11-15-2006, 08:29 PM   #10
Registered: Mar 2005
Distribution: slackware 11, arch 2007.08
Posts: 154

Rep: Reputation: 30
YAST has a section to configure wireless cards. I would give that a look before going through the trouble of writing you own script.
Old 11-16-2006, 12:13 PM   #11
LQ Newbie
Registered: Nov 2006
Posts: 13

Original Poster
Rep: Reputation: 0
I followed one of the recommendations that any rc.* script in /etc/rc.d/ will execute alphabetically. I created a script called rc.local:

# rc.local
# This file is provided for custom initialisation because
# Admin is not encouraged to touch rc.S or rc.M.
# This file is launched on the end of entering multi user mode (2-5)

/sbin/modprobe ndiswrapper
/usr/sbin/iwconfig wlan0 key open XXXXXXXX
/usr/sbin/iwconfig wlan0 essid MyEssid

/sbin/ifconfig wlan0 up
/sbin/dhcpcd wlan0
This worked! I was able to reboot the computer, and the wireless card was active and connected to the network as soon as Linux came up. I don't know if it would work in all run levels -- I don't know that much about run levels, so I just use the default (5?). I did not try putting it in /etc/init.d/boot.local, though if I have any problems I will try that as well.




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 On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
shell script to compare filese b/w local and remote and delete files from local serve dsids Linux - Networking 9 08-23-2006 07:20 AM
Setup local machine to allow lan machines to retrieve its local user mail. Brian1 Linux - Networking 3 03-30-2006 05:04 AM
How to get local gcc to link with local glibc dombrowsky Linux - Software 9 01-20-2006 02:01 PM
Local webserver -- How to deny all client install their local web server--Please help b:z Linux - Networking 13 04-16-2005 07:11 PM
Cannot resolve local addresses on local network danielgrenyer Linux - Networking 6 01-14-2004 11:03 AM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 04:32 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration