diff options
author | Charlie Root <root@freebsd.localdomain> | 2014-03-02 21:47:39 -0800 |
---|---|---|
committer | Charlie Root <root@freebsd.localdomain> | 2014-03-02 21:47:39 -0800 |
commit | 7023c602bdc44c64c23816d87de38c4f6013ff18 (patch) | |
tree | 6d2caeb587797b7f07fe42d434cb008a6a7eb146 | |
parent | dadb4846753db64586dc15526ae3e1c43f105236 (diff) | |
download | pfsense-7023c602bdc44c64c23816d87de38c4f6013ff18.zip pfsense-7023c602bdc44c64c23816d87de38c4f6013ff18.tar.gz |
Added support for UEFI booting to Network Booting configuration.
modified: conf.default/config.xml
modified: etc/inc/services.inc
modified: usr/local/www/services_dhcp.php
-rw-r--r-- | conf.default/config.xml | 2 | ||||
-rw-r--r-- | etc/inc/services.inc | 10 | ||||
-rwxr-xr-x | usr/local/www/services_dhcp.php | 17 |
3 files changed, 25 insertions, 4 deletions
diff --git a/conf.default/config.xml b/conf.default/config.xml index 19845ed..e1ef7c0 100644 --- a/conf.default/config.xml +++ b/conf.default/config.xml @@ -306,6 +306,8 @@ <ntpserver>xxx.xxx.xxx.xxx</ntpserver> <next-server></next-server> <filename></filename> + <filename32></filename32> + <filename64></filename64> --> </lan> <!-- diff --git a/etc/inc/services.inc b/etc/inc/services.inc index 0a5eb38..136f7a0 100644 --- a/etc/inc/services.inc +++ b/etc/inc/services.inc @@ -761,7 +761,15 @@ EOD; if ($dhcpifconf['nextserver'] <> "") { $dhcpdconf .= " next-server {$dhcpifconf['nextserver']};\n"; } - if ($dhcpifconf['filename'] <> "") { + if (($dhcpifconf['filename'] <> "") && ($dhcpifconf['filename32'] <> "") && ($dhcpifconf['filename64'] <> "")) { + $dhcpdconf .= " if option arch = 00:06 {\n"; + $dhcpdconf .= " filename \"{$dhcpifconf['filename32']}\";\n"; + $dhcpdconf .= " } else if option arch = 00:07 {\n"; + $dhcpdconf .= " filename \"{$dhcpifconf['filename64']}\";\n"; + $dhcpdconf .= " } else {\n"; + $dhcpdconf .= " filename \"{$dhcpifconf['filename']}\";\n"; + $dhcpdconf .= " }\n\n"; + } elseif ($dhcpifconf['filename'] <> "") { $dhcpdconf .= " filename \"{$dhcpifconf['filename']}\";\n"; } if ($dhcpifconf['rootpath'] <> "") { diff --git a/usr/local/www/services_dhcp.php b/usr/local/www/services_dhcp.php index b364768..da5e849 100755 --- a/usr/local/www/services_dhcp.php +++ b/usr/local/www/services_dhcp.php @@ -196,6 +196,8 @@ if (is_array($dhcpdconf)) { $pconfig['netboot'] = isset($dhcpdconf['netboot']); $pconfig['nextserver'] = $dhcpdconf['nextserver']; $pconfig['filename'] = $dhcpdconf['filename']; + $pconfig['filename32'] = $dhcpdconf['filename32']; + $pconfig['filename64'] = $dhcpdconf['filename64']; $pconfig['rootpath'] = $dhcpdconf['rootpath']; $pconfig['netmask'] = $dhcpdconf['netmask']; $pconfig['numberoptions'] = $dhcpdconf['numberoptions']; @@ -497,6 +499,8 @@ if ($_POST) { $dhcpdconf['netboot'] = ($_POST['netboot']) ? true : false; $dhcpdconf['nextserver'] = $_POST['nextserver']; $dhcpdconf['filename'] = $_POST['filename']; + $dhcpdconf['filename32'] = $_POST['filename32']; + $dhcpdconf['filename64'] = $_POST['filename64']; $dhcpdconf['rootpath'] = $_POST['rootpath']; // Handle the custom options rowhelper @@ -636,6 +640,8 @@ include("head.inc"); document.iform.netboot.disabled = endis; document.iform.nextserver.disabled = endis; document.iform.filename.disabled = endis; + document.iform.filename32.disabled = endis; + document.iform.filename64.disabled = endis; document.iform.rootpath.disabled = endis; document.iform.denyunknown.disabled = endis; } @@ -1080,10 +1086,15 @@ include("head.inc"); <b><?=gettext("Enables network booting.");?></b> <p> <?=gettext("Enter the IP of the"); ?> <b><?=gettext("next-server"); ?></b> - <input name="nextserver" type="text" class="formfld unknown" id="nextserver" size="20" value="<?=htmlspecialchars($pconfig['nextserver']);?>"> - <?=gettext("and the filename");?> - <input name="filename" type="text" class="formfld unknown" id="filename" size="20" value="<?=htmlspecialchars($pconfig['filename']);?>"><br> + <input name="nextserver" type="text" class="formfld unknown" id="nextserver" size="20" value="<?=htmlspecialchars($pconfig['nextserver']);?>"><br> + <?=gettext("and the default bios filename");?> + <input name="filename" type="text" class="formfld unknown" id="filename" size="20" value="<?=htmlspecialchars($pconfig['filename']);?>"><br> + <?=gettext("and the UEFI 32bit filename ");?> + <input name="filename32" type="text" class="formfld unknown" id="filename32" size="20" value="<?=htmlspecialchars($pconfig['filename32']);?>"><br> + <?=gettext("and the UEFI 64bit filename ");?> + <input name="filename64" type="text" class="formfld unknown" id="filename64" size="20" value="<?=htmlspecialchars($pconfig['filename64']);?>"><br> <?=gettext("Note: You need both a filename and a boot server configured for this to work!");?> + <?=gettext("You will need all three filenames and a boot server configured for UEFI to work!");?> <p> <?=gettext("Enter the"); ?> <b><?=gettext("root-path"); ?></b>-<?=gettext("string");?> <input name="rootpath" type="text" class="formfld unknown" id="rootpath" size="90" value="<?=htmlspecialchars($pconfig['rootpath']);?>"><br> |