#!/bin/bash
dracut_install ip dhclient hostname
# Include wired net drivers, excluding wireless
for modname in $(find "/lib/modules/$kernel/kernel/drivers" -name '*.ko'); do
  if nm -uPA $modname | grep -q eth_type_trans; then
    if echo "$modname" | grep -q wireless; then
      continue
    else
      instmods $modname 
    fi
  fi
done
inst "$moddir/ifup" "/sbin/ifup"
inst "$moddir/netroot" "/sbin/netroot"
inst "$moddir/dhclient-script" "/sbin/dhclient-script"
inst "$moddir/dhclient.conf" "/etc/dhclient.conf" 
instmods ecb arc4
inst_hook pre-udev 60 "$moddir/net-genrules.sh"
inst_hook cmdline 91 "$moddir/dhcp-root.sh"
inst_hook cmdline 99 "$moddir/parse-ip-opts.sh"
inst_hook pre-pivot 10 "$moddir/kill-dhclient.sh"

# TODO ifcfg config style is redhat specific, this should probably
# go into its own module at one time
inst_hook pre-pivot 20 "$moddir/write-ifcfg.sh"

mkdir -p "${initdir}/var/run"
