USB booting :: IFCONFIG Help



Hi all!!  New to the forums and new to Linux (I've played a little with SUSE 9.1 I guess, but very little), but loving it.  But I could use a little help from some guru-

in my /opt/bootlocal.sh file I have:

#!/bin/bash
# put other system startup command here
ifconfig eth0 address xxx.xxx.xxx.xxx netmask 255.255.255.0 broadcast xxx.xxx.xxx.xxx
route add default gw xxx.xxx.xxx.xxx
echo nameserver xxx.xxx.xxx.xxx > /etc/resolv.conf
echo nameserver xxx.xxx.xxx.xxx >> /etc/resolv.conf

where x is replaced by a number of course.
But upon booting I cannot access the network or get online.
I then type ifconfig -a and I can see that everything looks set, but it is not listed as up.
So then I type the ifconfig and route commands into the command line and whammo I can get online just fine.  Why?  What am I leaving out?  Do I need to add sudo before the commands?  I have to be superuser to enter them into the command line.  Thanks in advance!!

bootlocal is run as root, so sudo is not necessary.
Try adding 'eth0 up' to bootlocal

Thanks I tried that, no dice.  I still have to go to netcardconfig or use ifconfig at the command line to get it to work.  Could it be because DHCP is automatic when booting?  Should I shut down the card first with "ipconfig eth0 down" and then try to bring it up???  Thanks again for your help.
I'm not sure...my ethernet seems to work fine with DHCP, and i don't know much about manually configuring networks.  Let's hope someone here can help you more than I can.
Well, I have not done what you are trying, but I would try another approach if I didn't get it working the way you suggest. If you have anything on your network acting as a DHCP server, do you have the option enter your MAC address and have you router/firewall do 'dynamic static' IP assignments? If you do, you could have your router/firewall assign the same IP to that MAC address everytime it asks for an IP. I know that's not what you're looking for, but it would work if all else fails. Do you "need" a static IP ?
Next Page...
original here.