make it easier to specify alternate DHCP ports
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ltsp (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
As discussed with Oliver Grawert. See patch:
laga@prometheus
=== modified file 'conf.d/ltsp'
--- conf.d/ltsp 2008-03-04 12:35:43 +0000
+++ conf.d/ltsp 2008-03-04 12:48:53 +0000
@@ -1,2 +1,13 @@
MODULES="netboot"
BOOT="ltsp_nbd"
+
+# DHCPPORT: tell ipconfig from klibc-utils) to use an alternate DHCP port
+# Default: 68
+# example: if you want to use alternate DHCP ports, use something like
+# DHCPPORT="1068"
+# Your DHCP server will have to listen on $DHCPPORT - 1
+# Note: for alternate DHCP ports, see
+# http://<email address hidden>
+# That mail might be a bit outdated but it still gives a nice overview
+# DHCPPORT=""
+
=== modified file 'scripts/ltsp_nbd'
--- scripts/ltsp_nbd 2008-03-04 12:35:43 +0000
+++ scripts/ltsp_nbd 2008-03-04 13:24:15 +0000
@@ -7,6 +7,14 @@
run_scripts /scripts/nfs-top
[ "$quiet" != "y" ] && log_end_msg
+ if [ -n "$dhcpport" ]; then
+ DHCPPORT=
+ fi
+
+ if [ -n "$DHCPPORT" ]; then
+ IPCONFIGARGS="-p $DHCPPORT $IPCONFIGARGS"
+ fi
+
# For DHCP
modprobe -q af_packet
@@ -16,13 +24,13 @@
- ipconfig ${DEVICE}
+ ipconfig ${DEVICE} $IPCONFIGARGS
- ipconfig -c ${IPOPTS} -d ${DEVICE}
+ ipconfig -c ${IPOPTS} -d ${DEVICE} $IPCONFIGARGS
*)
- ipconfig -d $IPOPTS
+ ipconfig -d $IPOPTS $IPCONFIGARGS
Update: also document the dhcpport= option in conf.d/ltsp
=== modified file 'conf.d/ltsp' /msg31182. html
--- conf.d/ltsp 2008-03-04 12:35:43 +0000
+++ conf.d/ltsp 2008-03-04 13:38:08 +0000
@@ -1,2 +1,14 @@
MODULES="netboot"
BOOT="ltsp_nbd"
+
+# DHCPPORT: tell ipconfig from klibc-utils) to use an alternate DHCP port
+# Default: 68
+# example: if you want to use alternate DHCP ports, use something like
+# DHCPPORT="1068"
+# this variable can be overridden using the dhcpport= boot option
+# Your DHCP server will have to listen on $DHCPPORT - 1
+# Note: for alternate DHCP ports, see
+# http://<email address hidden>
+# That mail might be a bit outdated but it still gives a nice overview
+# DHCPPORT=""
+
=== modified file 'scripts/ltsp_nbd'
--- scripts/ltsp_nbd 2008-03-04 12:35:43 +0000
+++ scripts/ltsp_nbd 2008-03-04 13:24:15 +0000
@@ -7,6 +7,14 @@
run_scripts /scripts/nfs-top
[ "$quiet" != "y" ] && log_end_msg
+ if [ -n "$dhcpport" ]; then "$dhcpport"
+ DHCPPORT=
+ fi
+
+ if [ -n "$DHCPPORT" ]; then
+ IPCONFIGARGS="-p $DHCPPORT $IPCONFIGARGS"
+ fi
+
# For DHCP
modprobe -q af_packet
@@ -16,13 +24,13 @@
;;
""|on| any)
# Bring up device
;;
dhcp| bootp|rarp| both)
;;
- ipconfig ${DEVICE}
+ ipconfig ${DEVICE} $IPCONFIGARGS
- ipconfig -c ${IPOPTS} -d ${DEVICE}
+ ipconfig -c ${IPOPTS} -d ${DEVICE} $IPCONFIGARGS
*)
- ipconfig -d $IPOPTS
+ ipconfig -d $IPOPTS $IPCONFIGARGS