LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions
User Name
Password
Linux - Distributions This forum is for Distribution specific questions.
Red Hat, Slackware, Debian, Novell, LFS, Mandriva, Ubuntu, Fedora - the list goes on and on... Note: An (*) indicates there is no official participation from that distribution here at LQ.

Notices


Reply
  Search this Thread
Old 07-22-2004, 05:05 PM   #1
exodist
Senior Member
 
Registered: Aug 2003
Location: Portland, Oregon
Distribution: Arch
Posts: 1,374

Rep: Reputation: 47
Gentoo custom script dependancy problem


I decided to make my own network startup script because I dislike th egentoo network style, I did so following the tutorial on the site, the script works but it gives me a large error message 4 or 5 times saying it could not fine the dependancies for the script, here is the script:

depend() {
provide net
}

start() {
ebegin "Starting network configuration script"

if [ -e /var/run/dhcpcd-eth0.pid ]; then
einfo "Removing stale pid file..."
rm -f /var/run/dhcpcd-eth0.pid
fi

einfo "Configuring eth0"
/sbin/modprobe pegasus
/sbin/dhcpcd -t 10 -d eth0

einfo "Configuring eth1"
/sbin/modprobe via-rhine
/sbin/ifconfig eth1 192.168.0.2 netmask 255.255.255.0

einfo "Configuring eth2"
/sbin/modprobe tulip
/sbin/ifconfig eth2 192.168.3.1 netmask 255.255.255.0
}

stop() {
killall dhcpcd
}

restart() {
stop
/bin/sleep 3s
start
}
 
Old 07-22-2004, 08:37 PM   #2
osvaldomarques
Member
 
Registered: Jul 2004
Location: Rio de Janeiro - Brazil
Distribution: Conectiva 10 - Conectiva 8 - Slackware 9 - starting with LFS
Posts: 519

Rep: Reputation: 34
Hi exodist,
In this script you are trying to install three different ethernet cards. One named pegasus, one via-rhine and one tulip. Are you sure you have this three different cards?
If your answer to the first question is yes, are that 3 cards pci or isa? If one of it is ISA, may be it needs parameters like io=0xnnn and irq=ii, where "nnn" is the hexadecimal address of the card and "ii" is the irq number. Look carefully to this messages because, when a module fails to load, it gives you several message lines.

Have fun!
 
Old 07-22-2004, 08:57 PM   #3
exodist
Senior Member
 
Registered: Aug 2003
Location: Portland, Oregon
Distribution: Arch
Posts: 1,374

Original Poster
Rep: Reputation: 47
yes I am sure, pegasus is my usb ethernet card for my static internet ip and connection, via-rhine is my onboard used for connecting to my private network
tulip is my pci card for connecting to the computer next to me for remote x-sessions in order to keep from using to much bandwidth on the private network.

the script runs fine and does it's job, th eproblem is I get a lot of erros I can't paste for you on startup.
 
Old 07-23-2004, 08:13 PM   #4
osvaldomarques
Member
 
Registered: Jul 2004
Location: Rio de Janeiro - Brazil
Distribution: Conectiva 10 - Conectiva 8 - Slackware 9 - starting with LFS
Posts: 519

Rep: Reputation: 34
Did you replaced the gentoo network configuration script or you just added yours? Did you see if it complains for the three modules or, some does not? It appears to me the startup routines are trying to reload some modules.
 
Old 07-23-2004, 10:37 PM   #5
exodist
Senior Member
 
Registered: Aug 2003
Location: Portland, Oregon
Distribution: Arch
Posts: 1,374

Original Poster
Rep: Reputation: 47
I never configured the network the gentoo way, so there should not be any gentoo network scripts except the loopback device, but I will double check.....
 
Old 07-23-2004, 10:50 PM   #6
exodist
Senior Member
 
Registered: Aug 2003
Location: Portland, Oregon
Distribution: Arch
Posts: 1,374

Original Poster
Rep: Reputation: 47
ok, on boot I get the same error message 5 times without a brake inbetween, here is the message it repeats (Note my script is called customstuff, I added it with this command:
rc-update add customstuff boot (I had itis /etc/init.d already)):
(Green asterisk) Re-caching dependancy info (mtimes differ)...
(Red Asterisk) Could not get dependancy info for "customstuff"!
(Red Asterisk) Please run:

(Red Asterisk) # /sbin/depscan.sh

(Red Asterisk) to try and fix this.

then it runs the script with no problems with all my stuff added and green asterisks.
I tried running /sbin/depscan.sh, it did nothing to help.
 
Old 07-23-2004, 10:56 PM   #7
exodist
Senior Member
 
Registered: Aug 2003
Location: Portland, Oregon
Distribution: Arch
Posts: 1,374

Original Poster
Rep: Reputation: 47
also I have made some changes to the script, here is the new one

#!/bin/bash
depend() {
provide net
}

start() {
ebegin "Starting network configuration script"

if [ -e /var/run/dhcpcd-eth0.pid ]; then
einfo "Removing stale pid file..."
rm -f /var/run/dhcpcd-eth0.pid
fi

einfo "Configuring eth0"
/sbin/modprobe pegasus
/sbin/dhcpcd -t 10 -d eth0

einfo "Configuring eth1"
/sbin/modprobe via-rhine
/sbin/ifconfig eth1 192.168.0.2 netmask 255.255.255.0

einfo "Configuring eth2"
/sbin/modprobe tulip
/sbin/ifconfig eth2 192.168.3.1 netmask 255.255.255.0

einfo "Configuring alsa"
/sbin/modprobe snd-emu10k1
/sbin/modprobe snd-pcm-oss
/sbin/modprobe snd-mixer-oss
/usr/sbin/alsactl restore
/bin/chmod 777 /dev/snd/*

einfo "configuring nvidia"
/sbin/modprobe nvidia

}

stop() {
killall dhcpcd
ifconfig eth0 down
ifconfig eth1 down
ifconfig eth2 down
}

restart() {
stop
/bin/sleep 3s
start
}


I know some people would ask why I do not use the gentoo provided network and alsa scripts, the answer: I am a control freak and have always made my own scripts for this, but it was in slackware before.
 
Old 07-23-2004, 10:58 PM   #8
exodist
Senior Member
 
Registered: Aug 2003
Location: Portland, Oregon
Distribution: Arch
Posts: 1,374

Original Poster
Rep: Reputation: 47
oh, and to reply to the last message not sent by me, no the only other network script in there is for the loopback (lo) device
 
Old 07-23-2004, 11:03 PM   #9
osvaldomarques
Member
 
Registered: Jul 2004
Location: Rio de Janeiro - Brazil
Distribution: Conectiva 10 - Conectiva 8 - Slackware 9 - starting with LFS
Posts: 519

Rep: Reputation: 34
Hi exodist,
I never saw these messages you showed me now. It appears to be a gentoo specific. I guess it uses a new set of boot scripts I heard is being developed to do a faster start up. This new technique would work on dependancies like a "make file". I mean, if some daemon does not depends on another already running, both can be started in parallel, in opposition to the serial mode of System V. As you created your stuff and didn't registered in some way to the gentoo routines, it cannot get the dependancy to choose the way to start it.
 
Old 07-23-2004, 11:15 PM   #10
exodist
Senior Member
 
Registered: Aug 2003
Location: Portland, Oregon
Distribution: Arch
Posts: 1,374

Original Poster
Rep: Reputation: 47
in other words no idea? oh thanx anyway.
 
Old 07-23-2004, 11:25 PM   #11
osvaldomarques
Member
 
Registered: Jul 2004
Location: Rio de Janeiro - Brazil
Distribution: Conectiva 10 - Conectiva 8 - Slackware 9 - starting with LFS
Posts: 519

Rep: Reputation: 34
In other words, it does not have anything with kernel and modules. Its a specific matter of the gentoo distribution.

Have a nice week end!
 
Old 07-23-2004, 11:53 PM   #12
osvaldomarques
Member
 
Registered: Jul 2004
Location: Rio de Janeiro - Brazil
Distribution: Conectiva 10 - Conectiva 8 - Slackware 9 - starting with LFS
Posts: 519

Rep: Reputation: 34
Please, read [uri]http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=2&chap=5[/uri]
 
Old 07-24-2004, 12:13 AM   #13
exodist
Senior Member
 
Registered: Aug 2003
Location: Portland, Oregon
Distribution: Arch
Posts: 1,374

Original Poster
Rep: Reputation: 47
thank you, but that is the site I have been referencing since deciding to make my own script, I have read and reread it without skipping single line, if the information I need is in there than I am too stupid to see it.
 
Old 07-24-2004, 12:28 AM   #14
osvaldomarques
Member
 
Registered: Jul 2004
Location: Rio de Janeiro - Brazil
Distribution: Conectiva 10 - Conectiva 8 - Slackware 9 - starting with LFS
Posts: 519

Rep: Reputation: 34
The first thing I noted is you specified you script to be processed by bash (#!/bin/bash) and this pages instructs to use "#!/sbin/runscript"
 
Old 07-24-2004, 12:42 AM   #15
exodist
Senior Member
 
Registered: Aug 2003
Location: Portland, Oregon
Distribution: Arch
Posts: 1,374

Original Poster
Rep: Reputation: 47
I actually noticed that about 2 min after posting my message, sorry about that, I am redoijng part sof the script, than I will test that.
 
  


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
ooodi dependancy problem linmix Linux - Software 2 07-17-2005 04:36 PM
YUM - - Can't install! Dependancy problem on RH9? irlkersten Red Hat 7 05-07-2005 08:34 PM
FC3 apt dependancy problem mmc Fedora 2 01-05-2005 01:01 PM
Re: /bin/sh rpm dependancy problem MunCH Slackware 5 09-13-2004 05:49 AM
RPM dependancy problem glj Linux - Software 15 07-24-2001 09:16 AM

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

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