LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 12-19-2006, 07:48 PM   #1
Red Knuckles
Member
 
Registered: Jan 2006
Location: Colorado USA
Distribution: Debian AMD 64 Testing, Sabayon Linux x86-64 3.4, and Ubuntu AMD 64 7.04
Posts: 235

Rep: Reputation: 30
Question Davicom Tulip 'net card in Etch


I am very new to Debian, just installed Etch yesterday. I have the Davicom Tulip Ethernet Card. It uses one of 2 drivers tulip and dmfe. Debian loads tulip by default which doesn't work. To fix manually you run:

#rmmod tulip
#rmmod dmfe
#modprobe dmfe

And you have a net connection. How do I make this permenant in Debian? I've tried adding 'dmfe' to /etc/modules, adding blacklist 'tulip' to '/etc/modprobe.d/blacklist' and '/etc/hotplug/blacklist', and adding this script to '/etc/rcS.d/S40networking':

ifdown eth0
rmmod dmfe
rmmod tulip
modprobe dmfe
ifup eth0

but I still have no net connection when I reboot untill I do the manual fix. How to correct?
 
Old 12-19-2006, 08:09 PM   #2
Dutch Master
Senior Member
 
Registered: Dec 2005
Posts: 1,686

Rep: Reputation: 124Reputation: 124
Simple, put the script in /etc/rc2.d That's how I got my Linksys wireless NIC working in Etch
 
Old 12-19-2006, 08:29 PM   #3
Red Knuckles
Member
 
Registered: Jan 2006
Location: Colorado USA
Distribution: Debian AMD 64 Testing, Sabayon Linux x86-64 3.4, and Ubuntu AMD 64 7.04
Posts: 235

Original Poster
Rep: Reputation: 30
Question

Quote:
Originally Posted by Dutch Master
Simple, put the script in /etc/rc2.d That's how I got my Linksys wireless NIC working in Etch
/etc/rc2.d is a directory. Do I create a new file or add script to existing file?
 
Old 12-19-2006, 09:10 PM   #4
Dutch Master
Senior Member
 
Registered: Dec 2005
Posts: 1,686

Rep: Reputation: 124Reputation: 124
I presume you have the script in your home-dir somewhere. Make sure it's executable and change it's extension to .sh. (chmod +x </path/to/script> ) Start a rootconsole and create a symlink from /etc/rc2.d (that is, inside that directory) to your script:
Code:
ln -s /path/to/script/scriptname.sh /etc/rc2.d/Sxx<scriptname.sh>
Let me explain the command:
  1. ln -s: this calls the program to create a link, the -s option designates a symbolic link
  2. /path/to/script/scriptname.sh: the full path, starting at /, to your script
  3. /etc/rc2.d/Sxx<scriptname.sh>: the /etc/rc2.d part should be self-explanatory, the S designates a startup script, the xx is a 2 digit number to determine when in the bootsequence the script is called and <scriptname.sh> is of course the name of your script.
Make sure you don't choose the xx number too low. I'd suggest to take 99, as only then you're sure all dependencies for executing the script are available.

PS: if you'd enter the /etc/rc2.d dir and do ls -l you'll see all scripts there are actually symlinks to other directories

Last edited by Dutch Master; 12-19-2006 at 09:12 PM.
 
Old 12-19-2006, 09:19 PM   #5
Red Knuckles
Member
 
Registered: Jan 2006
Location: Colorado USA
Distribution: Debian AMD 64 Testing, Sabayon Linux x86-64 3.4, and Ubuntu AMD 64 7.04
Posts: 235

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by Dutch Master
I presume you have the script in your home-dir somewhere. Make sure it's executable and change it's extension to .sh. (chmod +x </path/to/script> ) Start a rootconsole and create a symlink from /etc/rc2.d (that is, inside that directory) to your script:
Code:
ln -s /path/to/script/scriptname.sh /etc/rc2.d/Sxx<scriptname.sh>
Let me explain the command:
  1. ln -s: this calls the program to create a link, the -s option designates a symbolic link
  2. /path/to/script/scriptname.sh: the full path, starting at /, to your script
  3. /etc/rc2.d/Sxx<scriptname.sh>: the /etc/rc2.d part should be self-explanatory, the S designates a startup script, the xx is a 2 digit number to determine when in the bootsequence the script is called and <scriptname.sh> is of course the name of your script.
Make sure you don't choose the xx number too low. I'd suggest to take 99, as only then you're sure all dependencies for executing the script are available.

PS: if you'd enter the /etc/rc2.d dir and do ls -l you'll see all scripts there are actually symlinks to other directories
I don't know yet how to create an executable script. The script is something I copied and pasted. How to?
 
Old 12-19-2006, 10:08 PM   #6
Dutch Master
Senior Member
 
Registered: Dec 2005
Posts: 1,686

Rep: Reputation: 124Reputation: 124
Open a console (as a regular user) and go to the directory where the script is stored using the cd command. I presume you have it somewhere in you home-dir, if not: copy it to your home-dir for security reasons. Then copy and execute this command:
Code:
chmod +x </path/to/script>
where <path/to/script> can be just the scriptname if you are in the same directory. To clarify for yourself that it's an executable script you can change the extension to .sh (if not done already) It doesn't matter for Linux, it's smart enough to figure out without extensions what's executable and what not ;-)

edit: I figured out that maybe you don't know how to write a script. Use this:
Code:
#! /bin/sh

# making the Davicom Tulip Ethernet Card work
ifdown eth0
rmmod dmfe
rmmod tulip
modprobe dmfe
ifup eth0

exit 0
Save this as tulip_eth.txt in your home-dir and proceed as described before.

Last edited by Dutch Master; 12-19-2006 at 10:15 PM.
 
Old 12-19-2006, 10:42 PM   #7
Red Knuckles
Member
 
Registered: Jan 2006
Location: Colorado USA
Distribution: Debian AMD 64 Testing, Sabayon Linux x86-64 3.4, and Ubuntu AMD 64 7.04
Posts: 235

Original Poster
Rep: Reputation: 30
Talking

Quote:
Originally Posted by Dutch Master
Open a console (as a regular user) and go to the directory where the script is stored using the cd command. I presume you have it somewhere in you home-dir, if not: copy it to your home-dir for security reasons. Then copy and execute this command:
Code:
chmod +x </path/to/script>
where <path/to/script> can be just the scriptname if you are in the same directory. To clarify for yourself that it's an executable script you can change the extension to .sh (if not done already) It doesn't matter for Linux, it's smart enough to figure out without extensions what's executable and what not ;-)

edit: I figured out that maybe you don't know how to write a script. Use this:
Code:
#! /bin/sh

# making the Davicom Tulip Ethernet Card work
ifdown eth0
rmmod dmfe
rmmod tulip
modprobe dmfe
ifup eth0

exit 0
Save this as tulip_eth.txt in your home-dir and proceed as described before.
Dutch Master, thanks for the help. For what it's worth the fact that I ask a question in a forum doesn't mean I stop trying to find the answer myself. I had my Sam's Fedora 4 manual out trying to teach myself how to write and executable script and was getting close when I got your last post.

I also discovered that for some reason [I probably had a detail wrong] following your instructions was creation a symbolic link in /etc/rc2.d but when I nanoed that file it was empty. So I just put the script in that file and it worked.

Now I'm going to review how to write a simple executable script. And the detail of the commands I entered and what did and didn't work. Thanks again.

For me to learn how to write and use simple scripts is a big newbie step. Now it's time!
 
  


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
Davicom Tulip Ethernet card Red Knuckles Fedora 2 11-06-2006 06:17 PM
Davicom NIC card networking help rightcoast Linux - Networking 14 11-09-2004 03:11 AM
My network card doesnt work? Davicom DM9102AF chipset entob *BSD 7 08-19-2004 05:07 PM
Problems setting up a davicom ethernet card on a fedora 1 system coyote399 Linux - Networking 4 02-20-2004 03:52 PM
davicom modem & OPTI sound card trouble Jordanl Linux - Hardware 0 11-26-2002 07:04 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

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