|
|
@ -2,18 +2,6 @@ |
|
|
|
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- |
|
|
|
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- |
|
|
|
# ex: ts=8 sw=4 sts=4 et filetype=sh |
|
|
|
# ex: ts=8 sw=4 sts=4 et filetype=sh |
|
|
|
|
|
|
|
|
|
|
|
# pxelinux provides macaddr '-' separated, but we need ':' |
|
|
|
|
|
|
|
fix_bootif() { |
|
|
|
|
|
|
|
local macaddr=${1} |
|
|
|
|
|
|
|
local IFS='-' |
|
|
|
|
|
|
|
macaddr=$(for i in ${macaddr} ; do echo -n $i:; done) |
|
|
|
|
|
|
|
macaddr=${macaddr%:} |
|
|
|
|
|
|
|
# strip hardware type field from pxelinux |
|
|
|
|
|
|
|
[ -n "${macaddr%??:??:??:??:??:??}" ] && macaddr=${macaddr#??:} |
|
|
|
|
|
|
|
# return macaddr with lowercase alpha characters expected by udev |
|
|
|
|
|
|
|
echo $macaddr | sed 'y/ABCDEF/abcdef/' |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
getargbool 0 rd.neednet && NEEDNET=1 |
|
|
|
getargbool 0 rd.neednet && NEEDNET=1 |
|
|
|
|
|
|
|
|
|
|
|
# Don't continue if we don't need network |
|
|
|
# Don't continue if we don't need network |
|
|
@ -21,6 +9,8 @@ if [ -z "$netroot" ] && [ ! -e "/tmp/net.ifaces" ] && [ "$NEEDNET" != "1" ]; the |
|
|
|
return |
|
|
|
return |
|
|
|
fi |
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
command -v fix_bootif >/dev/null || . /lib/net-lib.sh |
|
|
|
|
|
|
|
|
|
|
|
# Write udev rules |
|
|
|
# Write udev rules |
|
|
|
{ |
|
|
|
{ |
|
|
|
# bridge: attempt only the defined interface |
|
|
|
# bridge: attempt only the defined interface |
|
|
|