# INITRD {{{
function actionMkInitrd
{
- echo "Installing initrd $PATH_/minirt26.gz:"
+ echo "Installing initrd $PATH_/initrd.img:"
# until we have a stable file location API let's use
# an according heuristic
initrd_=initrd.img-"$(uname -r)"
- cp /boot/"$initrd_" "$PATH_"/minirt26.gz || die "Could not copy /boot/$initrd_"
+ cp /boot/"$initrd_" "$PATH_"/initrd.img || die "Could not copy /boot/$initrd_"
}
# }}}
NAMESERVERS_=`netGetNameservers warn`
GW_=`netGetDefaultGateway warn`
- GW_DEV_=`/sbin/ip route get "$GW_" | awk '{ print $3; exit; }'`
- if [ "$GW_DEV_" != "$INTERFACE_" ] && [ "$GW_DEV_" != "" ]; then
+ GW_DEV_=`/sbin/ip route get "$GW_" | sed 's/^local //' | awk '{ print $3; exit; }'`
+ if [ "$GW_DEV_" != "$INTERFACE_" ] && [ "$GW_DEV_" != "" ] && [ "$GW_DEV_" != "lo" ]; 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"
function actionClean
{
- for i in dhcpd.conf minirt26.gz; do
+ for i in dhcpd.conf initrd.img; do
execute "rm -f $PATH_/$i*"
done