Michael DeHaan schrieb:
> Rainer Duffner wrote:
>
>
>> Michael DeHaan schrieb:
>>
>>
>>
>>> Rainer Duffner wrote:
>>>
>>>
>>>
>>>
>>>> Hi,
>>>>
>>>> just updated to the latest cobbler 1.2.1-1 on RHEL5.
>>>>
>>>> Now, all my systems' MAC-addresses show up in /tftpboot/pxelinux.cfg
and
>>>> using --netboot-enabled=0 or de-selecting the checkbox in the
>>>> webinterface is futile.
>>>>
>>>> How can that happen?
>>>>
>>>>
>>>>
>>>> Regards,
>>>> Rainer
>>>> _______________________________________________
>>>> cobbler mailing list
>>>> cobbler(a)lists.fedorahosted.org
>>>>
https://fedorahosted.org/mailman/listinfo/cobbler
>>>>
>>>>
>>>>
>>>>
>>>>
>>> Did you read the contents of those files?
>>> The systems still netboot but those config files tell them to boot to
>>> the hard drive as opposed to doing a reinstall, so it does the same
>>> thing, but in a better way that eliminates a certain class of potential
>>> errors.
>>>
>>>
https://fedorahosted.org/pipermail/cobbler/2008-August/000563.html
>>>
>>> --Michael
>>> _______________________________________________
>>> cobbler mailing list
>>> cobbler(a)lists.fedorahosted.org
>>>
https://fedorahosted.org/mailman/listinfo/cobbler
>>>
>>>
>>>
>>>
>> You're right - and I saw that. But I still can't de-select the
>> netboot-enabled checkbox in the GUI.
>> I'm now wondering how I enable netbooting for these hosts that I
>> actually want to netboot...
>>
>> I must have missed the above mentioned mail (or missed its importance).
>>
>>
>> cheers,
>> Rainer
>> _______________________________________________
>> cobbler mailing list
>> cobbler(a)lists.fedorahosted.org
>>
https://fedorahosted.org/mailman/listinfo/cobbler
>>
>>
>>
> Sounds like there might just be a WebUI problem?
>
> Cobbler system edit --name=foo --netboot-enabled=0/1 should still work.
>
>
>
Yeah, I did that in a for-loop to be sure nothing else boots over the net.
Previously, I would check that no files were lying around in the
tftpboot directory ;-)
I agree, though, that the now inacted system is more "sensible" for a
large-scale deployment.
Rainer
_______________________________________________
cobbler mailing list
cobbler(a)lists.fedorahosted.org
https://fedorahosted.org/mailman/listinfo/cobbler
Here's the fix:
diff --git a/webui_templates/system_edit.tmpl
b/webui_templates/system_edit.tmpl
index b996520..ee45b0a 100644
--- a/webui_templates/system_edit.tmpl
+++ b/webui_templates/system_edit.tmpl
@@ -193,11 +193,16 @@ function page_onload() {
<label for="netboot">Netboot Enabled</label>
</td>
<td>
- <input type="checkbox" name="netboot" id="netboot"
- #if not $system or $system.netboot_enabled
- checked="True"
+ #if $system
+ #if str($system.netboot_enabled) != "False"
+ <input type="checkbox" name="netboot"
id="netboot" checked=True>
+ #else
+ <input type="checkbox" name="netboot"
id="netboot">
+ #end if
+ #else
+ <input type="checkbox" name="netboot" id="netboot"
checked="True">
#end if
- >
+
<p class="context-tip">Deselect to keep this system from PXE
booting</p>
</td>
</tr>
It turned out it was being set fine, but the Web UI wasn't displaying
the selection correctly, which could also result in it being
saved wrong if it wasn't toggled.
Apparently some weird handling with Cheetah and booleans? There is
probably
a cleaner way to write the above, but interestingly "checked=False"
isn't meaningful HTML.
Either way, this works.
This will be included in 1.2.3 when it comes out. (Should be Friday,
barring hurricanes).
--Michael