projects
/
grml-terminalserver.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Release new version 0.105.0
[grml-terminalserver.git]
/
templates
/
dhcpd_config
diff --git
a/templates/dhcpd_config
b/templates/dhcpd_config
index
2b847c7
..
5bf9ded
100644
(file)
--- a/
templates/dhcpd_config
+++ b/
templates/dhcpd_config
@@
-24,8
+24,13
@@
date_=`execute date warn`
# insert commas when having multiple nameservers
date_=`execute date warn`
# insert commas when having multiple nameservers
-DNS_=$(echo "$NAMESERVERS_" | sed -e 's/\([0-9]\) \([0-9]\)/\1, \2/g')
+if [ -n "$NAMESERVERS_" ]; then
+ DNS_LINE_="option domain-name-servers $(echo "$NAMESERVERS_" | sed -e 's/\([0-9]\) \([0-9]\)/\1, \2/g');"
+fi
# note: we don't support multiple routers options
# note: we don't support multiple routers options
+if [ -n "$GW_" ]; then
+ ROUTERS_LINE_="option routers $GW_;"
+fi
cat >"$DHCPD_CONFIG_FILE_" <<EOT
# ${DHCPD_CONFIG_FILE_##/*/} for GRML terminalserver
cat >"$DHCPD_CONFIG_FILE_" <<EOT
# ${DHCPD_CONFIG_FILE_##/*/} for GRML terminalserver
@@
-40,21
+45,27
@@
cat >"$DHCPD_CONFIG_FILE_" <<EOT
# global settings
allow booting;
allow bootp;
# global settings
allow booting;
allow bootp;
-#option option-150 code 150 = text ;
-#option T150 code 150 = string;
default-lease-time 600;
max-lease-time 7200;
default-lease-time 600;
max-lease-time 7200;
+# UEFI boot with DHCPv4
+option architecture-type code 93 = unsigned integer 16;
+
subnet $NETWORK_ netmask $NETMASK_ {
next-server $IP_;
subnet $NETWORK_ netmask $NETMASK_ {
next-server $IP_;
- if substring (option vendor-class-identifier, 0, 9) = "Etherboot" { filename "etherboot.nbi"; }
- else { filename "pxelinux.0"; }
# option subnet-mask $NETMASK_;
range $IPRANGE_FROM_ $IPRANGE_TO_;
# option subnet-mask $NETMASK_;
range $IPRANGE_FROM_ $IPRANGE_TO_;
- option routers $GW_;
- option domain-name-servers $DNS_;
-# option T150 "/menu.lst";
-# option option-150 "(nd)/menu.lst";
+ $ROUTERS_LINE_
+ $DNS_LINE_
+
+ class "pxeclients" {
+ match if substring (option vendor-class-identifier, 0 ,9) = "PXEClient";
+ if option architecture-type = 00:07 {
+ filename "shim.efi";
+ } else {
+ filename "pxelinux.0";
+ }
+ }
}
EOT
}
EOT