Project

General

Profile

« Previous | Next » 

Revision 838e1f63

Added by Renato Botelho over 11 years ago

Use correct parameter (bootfile-url) to configure netboot on DHCPdv6, it fixes #3421

View differences:

usr/local/www/services_dhcpv6.php
114 114
	$pconfig['tftp'] = $config['dhcpdv6'][$if]['tftp'];
115 115
	$pconfig['ldap'] = $config['dhcpdv6'][$if]['ldap'];
116 116
	$pconfig['netboot'] = isset($config['dhcpdv6'][$if]['netboot']);
117
	$pconfig['nextserver'] = $config['dhcpdv6'][$if]['nextserver'];
118
	$pconfig['filename'] = $config['dhcpdv6'][$if]['filename'];
119
	$pconfig['rootpath'] = $config['dhcpdv6'][$if]['rootpath'];
117
	$pconfig['bootfile_url'] = $config['dhcpdv6'][$if]['bootfile_url'];
120 118
	$pconfig['netmask'] = $config['dhcpdv6'][$if]['netmask'];
121 119
	$pconfig['numberoptions'] = $config['dhcpdv6'][$if]['numberoptions'];
122 120
	$pconfig['dhcpv6leaseinlocaltime'] = $config['dhcpdv6'][$if]['dhcpv6leaseinlocaltime'];
......
208 206
			$input_errors[] = gettext("A valid domain name must be specified for the DNS domain.");
209 207
		if ($_POST['tftp'] && !is_ipaddr($_POST['tftp']) && !is_domain($_POST['tftp']) && !is_URL($_POST['tftp']))
210 208
			$input_errors[] = gettext("A valid IPv6 address or hostname must be specified for the TFTP server.");
211
		if (($_POST['nextserver'] && !is_ipaddrv6($_POST['nextserver'])))
212
			$input_errors[] = gettext("A valid IPv6 address must be specified for the network boot server.");
209
		if (($_POST['bootfile_url'] && !is_URL($_POST['bootfile_url'])))
210
			$input_errors[] = gettext("A valid URL must be specified for the network bootfile.");
213 211

  
214 212
		// Disallow a range that includes the virtualip
215 213
		if (is_array($config['virtualip']['vip'])) {
......
305 303
		$config['dhcpdv6'][$if]['tftp'] = $_POST['tftp'];
306 304
		$config['dhcpdv6'][$if]['ldap'] = $_POST['ldap'];
307 305
		$config['dhcpdv6'][$if]['netboot'] = ($_POST['netboot']) ? true : false;
308
		$config['dhcpdv6'][$if]['nextserver'] = $_POST['nextserver'];
309
		$config['dhcpdv6'][$if]['filename'] = $_POST['filename'];
310
		$config['dhcpdv6'][$if]['rootpath'] = $_POST['rootpath'];
306
		$config['dhcpdv6'][$if]['bootfile_url'] = $_POST['bootfile_url'];
311 307
		$config['dhcpdv6'][$if]['dhcpv6leaseinlocaltime'] = $_POST['dhcpv6leaseinlocaltime'];
312 308

  
313 309
		// Handle the custom options rowhelper
......
402 398
		//document.iform.tftp.disabled = endis;
403 399
		document.iform.ldap.disabled = endis;
404 400
		document.iform.netboot.disabled = endis;
405
		document.iform.nextserver.disabled = endis;
406
		document.iform.filename.disabled = endis;
407
		document.iform.rootpath.disabled = endis;
401
		document.iform.bootfile_url.disabled = endis;
408 402
	}
409 403

  
410 404
	function show_shownumbervalue() {
......
733 727
					<input valign="middle" type="checkbox" value="yes" name="netboot" id="netboot" <?php if($pconfig['netboot']) echo " checked"; ?>>&nbsp;
734 728
					<b><?=gettext("Enables network booting.");?></b>
735 729
					<p>
736
					<?=gettext("Enter the IP of the"); ?> <b><?=gettext("next-server"); ?></b>
737
					<input name="nextserver" type="text" class="formfld unknown" id="nextserver" size="28" value="<?=htmlspecialchars($pconfig['nextserver']);?>">
738
					<?=gettext("and the filename");?>
739
					<input name="filename" type="text" class="formfld unknown" id="filename" size="28" value="<?=htmlspecialchars($pconfig['filename']);?>"><br>
740
					<?=gettext("Note: You need both a filename and a boot server configured for this to work!");?>
741
					<p>
742
					<?=gettext("Enter the"); ?> <b><?=gettext("root-path"); ?></b>-<?=gettext("string");?>
743
					<input name="rootpath" type="text" class="formfld unknown" id="rootpath" size="90" value="<?=htmlspecialchars($pconfig['rootpath']);?>"><br>
744
					<?=gettext("Note: string-format: iscsi:(servername):(protocol):(port):(LUN):targetname");?>
730
					<?=gettext("Enter the Bootfile URL");?>
731
					<input name="bootfile_url" type="text" class="formfld unknown" id="bootfile_url" size="28" value="<?=htmlspecialchars($pconfig['bootfile_url']);?>">
745 732
				</div>
746 733
			</td>
747 734
			</tr>

Also available in: Unified diff