mirror of
https://github.com/xcat2/xcat-core.git
synced 2026-05-17 11:54:16 +00:00
fix: strip R:: prefix from netboot config when all options are persistent
When all addkcmdline options have R:: prefix (persistent options for the installed OS), the volatile check in xnba.pm and pxe.pm would fail because volatile was undefined. This left the original R::-prefixed string in the netboot config instead of stripping it. The fix ensures we always use the volatile portion after calling splitkcmdline, even if it's empty. Persistent (R::) options are handled separately by Template.pm via PERSKCMDLINE for the installed OS bootloader. Fixes #7442
This commit is contained in:
@@ -119,9 +119,10 @@ sub setstate {
|
||||
$cmdhashref = xCAT::Utils->splitkcmdline($kcmdlinehack);
|
||||
}
|
||||
|
||||
if ($cmdhashref and $cmdhashref->{volatile})
|
||||
{
|
||||
$kcmdlinehack = $cmdhashref->{volatile};
|
||||
if ($cmdhashref) {
|
||||
# Use only volatile options for netboot; persistent (R::) options
|
||||
# are handled separately for the installed OS via PERSKCMDLINE
|
||||
$kcmdlinehack = $cmdhashref->{volatile} // "";
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -186,9 +186,10 @@ sub setstate {
|
||||
$cmdhashref = xCAT::Utils->splitkcmdline($kcmdlinehack);
|
||||
}
|
||||
|
||||
if ($cmdhashref and $cmdhashref->{volatile})
|
||||
{
|
||||
$kcmdlinehack = $cmdhashref->{volatile};
|
||||
if ($cmdhashref) {
|
||||
# Use only volatile options for netboot; persistent (R::) options
|
||||
# are handled separately for the installed OS via PERSKCMDLINE
|
||||
$kcmdlinehack = $cmdhashref->{volatile} // "";
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user