* Automatically bring up the network devices and start dhclient on
them. svn path=/nixu/trunk/; revision=6976
This commit is contained in:
parent
da8cec4795
commit
624fe3f2d4
@ -59,6 +59,18 @@ for i in /sys/bus/pci/devices/*/modalias; do
|
||||
modprobe $(cat $i)
|
||||
done
|
||||
|
||||
# Bring up the network devices.
|
||||
modprobe af_packet
|
||||
for i in $(cd /sys/class/net && ls -d *); do
|
||||
echo "Bringing up network device $i..."
|
||||
if ifconfig $i up; then
|
||||
if test "$i" != "lo"; then
|
||||
mkdir -p /var/state/dhcp
|
||||
dhclient $i
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
# login/su absolutely need this.
|
||||
touch /etc/login.defs
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
{ genericSubstituter, shell, coreutils, findutils
|
||||
, utillinux, kernel, sysklogd, mingetty, udev
|
||||
, module_init_tools
|
||||
, module_init_tools, nettools, dhcp
|
||||
, path ? []
|
||||
}:
|
||||
|
||||
@ -14,6 +14,8 @@ genericSubstituter {
|
||||
utillinux
|
||||
udev
|
||||
module_init_tools
|
||||
nettools
|
||||
dhcp
|
||||
];
|
||||
extraPath = path;
|
||||
makeDevices = ./make-devices.sh;
|
||||
|
@ -64,8 +64,10 @@ rec {
|
||||
# everything else to bring up the system.
|
||||
bootStage2 = import ./boot-stage-2.nix {
|
||||
inherit (pkgs) genericSubstituter coreutils findutils
|
||||
utillinux kernel sysklogd udev module_init_tools;
|
||||
utillinux kernel sysklogd udev module_init_tools
|
||||
nettools;
|
||||
shell = pkgs.bash + "/bin/sh";
|
||||
dhcp = pkgs.dhcpWrapper;
|
||||
|
||||
# Additional stuff; add whatever you want here.
|
||||
path = [
|
||||
@ -83,8 +85,7 @@ rec {
|
||||
pkgs.less
|
||||
pkgs.nano
|
||||
pkgs.netcat
|
||||
pkgs.nettools
|
||||
pkgs.vim
|
||||
# pkgs.vim
|
||||
pkgs.nix
|
||||
pkgs.strace
|
||||
pkgs.sysvinit
|
||||
|
Loading…
Reference in New Issue
Block a user