LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking > Linux - Wireless Networking
User Name
Password
Linux - Wireless Networking This forum is for the discussion of wireless networking in Linux.

Notices

Reply
 
Search this Thread
Old 01-20-2005, 02:39 PM   #1
St4ckHOu5e
LQ Newbie
 
Registered: Jan 2005
Posts: 12

Rep: Reputation: 0
Set up everytime?


I am using ndiswrapper and have it all set up and working but every time I restart I have to set up all the configurations again ex. setting mode to Ad-Hoc changing the ssid and restricted key. Is there a way I can save this configuration so that it loads those settings as the default? or some other way that it will load those settings on startup that way I don't have to set it up eveytime I restart?
 
Old 01-20-2005, 03:09 PM   #2
leonscape
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Debian SID / KDE 3.5
Posts: 2,313

Rep: Reputation: 47
What you probably need to do is setup a startup script for use by init, for your runlevel. Thats how these things are usually done.
 
Old 01-20-2005, 04:31 PM   #3
St4ckHOu5e
LQ Newbie
 
Registered: Jan 2005
Posts: 12

Original Poster
Rep: Reputation: 0
And where or how would I set up one of these scripts? Sry I am new to this.
 
Old 01-20-2005, 04:35 PM   #4
leonscape
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Debian SID / KDE 3.5
Posts: 2,313

Rep: Reputation: 47
What distro are you using?
 
Old 01-20-2005, 04:59 PM   #5
St4ckHOu5e
LQ Newbie
 
Registered: Jan 2005
Posts: 12

Original Poster
Rep: Reputation: 0
Ubuntu so pretty much Debian
 
Old 01-20-2005, 05:09 PM   #6
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654
I'm not sure about ubunto, but the scripts which startup network devices are usually located under the /etc/sysconfig directory. Possibly in the /etc/sysconfig/network-scripts directory. There may be some scripts there already that you can use as a model. Also, is there a graphical setup for networking that can do all of this for you?

Here is a howto webpage which gives the names of the scripts and changes you need to make:
http://www.webservertalk.com/archive...11-480267.html
 
Old 01-20-2005, 05:14 PM   #7
St4ckHOu5e
LQ Newbie
 
Registered: Jan 2005
Posts: 12

Original Poster
Rep: Reputation: 0
There is a graphical interface that will do it but it seems to reset everytime I restart for some reason.
 
Old 01-20-2005, 05:19 PM   #8
leonscape
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Debian SID / KDE 3.5
Posts: 2,313

Rep: Reputation: 47
What you want to do is crate a text file it should look something like this
Code:
#! /bin/sh
case "$1" in
    start)
        #This is where you place the commands you need to start it up
        ;;
    stop)
        #What to do ( if anything ) when you want to shut it down
        ;;
    restart)
        $0 stop  &&  $0 start
        ;;
    status)
        # A command which prints out status information
        ;;
    *)
        echo "Usage: $0 {start|stop|status|restart}"
        exit 1
        ;;
 esac
You may only need to put stuff in the start section. Place this file into /etc/init.d/ and call it something unique say ndisconf, and then do the command

chmod +x ndisconf

Now create a symlink in your runlevel directories say if you want to start it up in runlevel 2 the directory is /etc/rc2.d the commands for this would be

cd /etc/rc2.d
ln -s ../init.d/ndisconf S30ndisconf

Say you have to set stuff for when you shut down ( You've placed something in the stop section above ) you'd have to put symlinks in rc0.d and rc6.d which are the shutdown and reboot runlevels.

cd /etc/rc0.d
ln -s ../init.d/ndisconf K70ndisconf
cd /etc/rc6.d
ln -s ../init.d/ndisconf K70ndisconf

That should cover you. Note the numbers I've chosen ( 30 and 70 ) control the order in which things are done. I've suggested these as there as this will be started after most of your other init scripts, but before X stuff starts kicking in.

Edit:
If you tell me what commands you enter to setup ndiswrapper stuff I can post what the script should be.

Last edited by leonscape; 01-20-2005 at 05:26 PM.
 
Old 01-20-2005, 05:42 PM   #9
St4ckHOu5e
LQ Newbie
 
Registered: Jan 2005
Posts: 12

Original Poster
Rep: Reputation: 0
Thank you guys, got it working just fine now!
 
  


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Have to install everytime to come to X. c3nturion Linux - Hardware 2 02-02-2005 12:30 AM
Need to reset after power on everytime Jingle Linux - Software 1 04-17-2004 03:58 PM
Why do 'insmod' everytime? chem1 Linux - Hardware 3 02-23-2004 01:26 PM
Abiword, v2, crashing everytime bugyugo Linux - Software 2 12-20-2003 09:10 AM
Must detect soundcard everytime I use it mfeat Linux - Hardware 3 11-28-2003 12:32 PM


All times are GMT -5. The time now is 11:21 AM.

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 Google+: linuxquestions
Open Source Consulting | Domain Registration