DebianThis forum is for the discussion of Debian Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: Debian AMD 64 Testing, Sabayon Linux x86-64 3.4, and Ubuntu AMD 64 7.04
Posts: 235
Rep:
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':
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:
ln -s: this calls the program to create a link, the -s option designates a symbolic link
/path/to/script/scriptname.sh: the full path, starting at /, to your script
/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.
Distribution: Debian AMD 64 Testing, Sabayon Linux x86-64 3.4, and Ubuntu AMD 64 7.04
Posts: 235
Original Poster
Rep:
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:
ln -s: this calls the program to create a link, the -s option designates a symbolic link
/path/to/script/scriptname.sh: the full path, starting at /, to your script
/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?
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.
Distribution: Debian AMD 64 Testing, Sabayon Linux x86-64 3.4, and Ubuntu AMD 64 7.04
Posts: 235
Original Poster
Rep:
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!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.