If you plug in your cable
after booting Slackware, you need to restart your network service.
As root:
Code:
/etc/rc.d/rc.inet1 restart
And if you want to disable DHCP during boot, well my methid would be to just edit /etc/rc.d/rc.inet1.conf
Code:
# Config information for eth0:
IPADDR[0]=""
NETMASK[0]=""
#USE_DHCP[0]="yes"
USE_DHCP[0]=""
DHCP_HOSTNAME[0]=""
And then either add static values (you may need to enable this on your router) or run a DHCP request manually when you want to connect.
As root:
Setting up static is a bit more work than DHCP, but you only need to do it once. In order for your machine to connect to the internet you need at least three things:
An IP address
A gateway
Nameservers
This can be fine tuned with things like subnet masks, but if you don't specify those the machine will fall back to defaults which should be good enough for most purposes.
Anyway, you can define your IP address in /etc/rc.d/rc.inet1.conf or define it manually by running:
Code:
ifconfig eth0 {address}
You can define your gateway in /etc/rc.d/rc.inet1.conf or define it manually by running:
Code:
route add default gw {router_address}
And the nameservers are defined in /etc/resolv.conf. Chances are they are already defined by previous runs of dhcpcd:
Code:
cat /etc/resolv.conf
# Example: uses opendns
nameserver 208.67.222.220
nameserver 208.67.220.222