NETWORK_=""
OPTIONS_=""
BOOT_ARGS_=""
-NAT_INTERFACE_=""
+NAT_INTERFACE_="none"
###
isNotExistent $CARDS_DETECTED_BY_DISCOVER && \
# find *all* network drivers, but do not include wlan/pcmcia/... related ones
# blacklist: proteon and depca as they seem to cause problems with udevsettle
- find /lib/modules/`uname -r`/kernel/drivers/net/ -name \*.ko | grep -v 'wireless\|wan\|hamradio\|wlan\|ppp\|irda\|pcmcia\|depca\|proteon' | \
- sed 's#.*./## ; s#\.ko##' | sort | uniq > $CARDS_DETECTED_BY_DISCOVER
+ find /lib/modules/${KERNEL_VERSION_}/kernel/drivers/net/ -name \*.ko | \
+ grep -v 'wireless\|wan\|hamradio\|wlan\|ppp\|irda\|pcmcia\|depca\|proteon' | \
+ sed 's#.*./## ; s#\.ko##' | sort | uniq > $CARDS_DETECTED_BY_DISCOVER
# find the ones supported by discover
# for mod in `grep "name'>.*</data>" /lib/discover/pci-device.xml | sed "s#.*name'>## ; s#</data>##" | sort -u`; do
# find /lib/modules/${KERNEL_VERSION_}/kernel/drivers/net -name ${mod}.ko | sed 's#.*./## ; s#\.ko##' >> $CARDS_DETECTED_BY_DISCOVER
# put everything into the new initrd
local tmp_size=`du -s $INITRD_ |awk '{print $1}'` # in kB
let tmp_size=$tmp_size+1000
- if (( $tmp_size >= 16000 )); then
- warn "Your initrd is $tmp_size kByte large => TOO BIG (should be <= 16000kB)"
+ local max_size=24000
+ if (( $tmp_size >= $max_size )); then
+ warn "Your initrd is $tmp_size kByte large => TOO BIG (should be <= ${max_size}kB)"
warn "Please remove a few modules from $CARDS_DETECTED_BY_DISCOVER or edit $INITRD_ manually"
return 1
fi
NAMESERVERS_=`netGetNameservers warn`
GW_=`netGetDefaultGateway warn`
GW_DEV_=`/sbin/ip route get "$GW_" | awk '{ print $3; exit; }'`
- if [ "$GW_DEV_" != "$INTERFACE_" ]; then
+ if [ "$GW_DEV_" != "$INTERFACE_" ] && [ "$GW_DEV_" != "" ]; then
# GW_DEV_ of server is not the same device as the one serviced by dhcpd
# so it doesn't make sense to provide the GW_ address to the clients
local do_nat_="YES"
GW_=
NAT_INTERFACE_="none"
fi
- else
- # no NAT, no sensible gateway
- GW_=
- NAT_INTERFACE_="none"
fi