summaryrefslogtreecommitdiffstats
path: root/initramfs/stage3-stuff/bin/dhcpmkconfig
diff options
context:
space:
mode:
Diffstat (limited to 'initramfs/stage3-stuff/bin/dhcpmkconfig')
-rwxr-xr-xinitramfs/stage3-stuff/bin/dhcpmkconfig3
1 files changed, 3 insertions, 0 deletions
diff --git a/initramfs/stage3-stuff/bin/dhcpmkconfig b/initramfs/stage3-stuff/bin/dhcpmkconfig
index 87e48683..c8c4d40c 100755
--- a/initramfs/stage3-stuff/bin/dhcpmkconfig
+++ b/initramfs/stage3-stuff/bin/dhcpmkconfig
@@ -23,6 +23,9 @@
echo -e "# network configuration written by $0:" >/tmp/confviadhcp
unset HOME IFS KCMDLINE DEBUGLEVEL MODPRV TERM BOOTIF BOOT_IMAGE \
infomsg mask lease interface cfgmsg cfgfile boot_file no_bootsplash
+# set the broadcast address if not delivered by dhcp
+[ -z "$broadcast" ] && \
+ broadcast=$(ipcalc -b $ip/$subnet|sed s/.*=//)
set | sed \
-e "s,^P.*,,;s,ntpsrv,ntp_servers,;s,ip,clientip," \
-e "s,serverid,serverip,;s,subnet,subnet_mask," \