LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE
User Name
Password
SUSE / openSUSE This Forum is for the discussion of Suse Linux.

Notices


Reply
  Search this Thread
Old 10-13-2005, 04:25 PM   #1
Larsza
LQ Newbie
 
Registered: Sep 2005
Posts: 12

Rep: Reputation: 0
Startup script


Hello,

I have a little problem. Every time i turn on my computer i have to open Konsole and type dhcpcd eth1 to connect to the Internet. After I do this everything works like a charm.

I wonder if i can automate this with a script on startup? In that case how do you do it? Or is there an other easy solution?

Larsza..
 
Old 10-13-2005, 04:33 PM   #2
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
Yes, this can be automated with a script.

But maybe there is a reason it is not starting normally. In YaST, have you configured eth1 to gets its IP address from a dhcp server?
 
Old 10-13-2005, 05:20 PM   #3
Larsza
LQ Newbie
 
Registered: Sep 2005
Posts: 12

Original Poster
Rep: Reputation: 0
Yes, I've set everything up right. Everything works like it should. I use Suse 9.3 on a portable, with a wireless network. I can connect to the router without making the dhcpcd eth1 command, but I can't access the Internet.

How can I make this script?
 
Old 10-14-2005, 01:00 PM   #4
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
Probably the easiest way is for you to add that command to your ~/.profile file. Log off and log back in and it will run automatically.
 
Old 10-15-2005, 03:14 AM   #5
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
You might try printing out the output of ifconfig eth1 before and after running dhcpcd eth1. Compare the two printouts.

Are you sure that you have dhcp selected for the 'eth1' interface. It should be getting the IP address and have the other information like gateway address and dns addresses set by the dhcp server when you startup. What is on eth0? Do you have each interface on separate subnets? My main point however is that unless you want set up the network settings on an interface manually, you need to select DHCP for each interface, not just one of them.

It may be better to find out what is not working correctly, rather than wedging in a script, which shouldn't be necessary.
 
Old 10-20-2005, 09:59 PM   #6
dsuratman
Member
 
Registered: Nov 2003
Location: CA, USA
Distribution: Ubuntu 7.10
Posts: 32

Rep: Reputation: 15
What type of user can execute 'dhcpcd'? Is it only root can do that? Thanks.
 
Old 10-21-2005, 06:52 AM   #7
Larsza
LQ Newbie
 
Registered: Sep 2005
Posts: 12

Original Poster
Rep: Reputation: 0
Only root can do the dhcpcd command..

Yes, I've set up all the network connections correctly. I don't understand why it doesn't work. One theory is that it's blocked by the firewall.. I've tried to figure out this firewall, but I don't understand much about it. Anyway, when I run the dhcpcd command the output says something about setting up firewall rules.. So I think perhaps it comes from that. Could I be right?
 
Old 10-21-2005, 06:59 AM   #8
Larsza
LQ Newbie
 
Registered: Sep 2005
Posts: 12

Original Poster
Rep: Reputation: 0
To Anomie: if I add a linue in the ~/.profile file how can I do this when my profile doesn't have access to these commands? I meen I have to be root to execute these commands, so if I insert it in the ~/.profile file it won't work..

I'm wrong?
 
  


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
'cannot stat' script in /etc/rc.d/, try to run script at startup quintan Linux - Software 1 11-21-2005 02:53 AM
How to call a script from a system startup script? jonatito Linux - Newbie 7 11-11-2005 09:40 PM
startup script rockwell_001 Linux - General 4 04-21-2005 04:22 PM
startup script ... again. Vindane Linux - Wireless Networking 2 03-04-2005 02:57 AM
Script at startup rohde Linux - Newbie 2 09-12-2004 09:32 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE

All times are GMT -5. The time now is 07:15 PM.

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