mirror of
https://github.com/unraid/webgui.git
synced 2026-04-25 20:01:38 -05:00
Fix usb updates.
This commit is contained in:
@@ -468,9 +468,8 @@
|
||||
if (isset($usbopt[$v]) && !$vmclone ) {
|
||||
if (strpos($usbopt[$v], "#remove") == false) $startupPolicy = 'startupPolicy="optional"' ; else $startupPolicy = '' ;
|
||||
}
|
||||
if ($vmclone ) {
|
||||
if (isset($v["startupPolicy"]) && $vmclone ) {
|
||||
if ($v["startupPolicy"] == "optional" ) $startupPolicy = 'startupPolicy="optional"' ; else $startupPolicy = '' ;
|
||||
#$startupPolicy = 'startupPolicy="optional"' ;
|
||||
}
|
||||
|
||||
$usbstr .= "<hostdev mode='subsystem' type='usb'>
|
||||
@@ -481,7 +480,7 @@
|
||||
if (!empty($usbboot[$v]) && !$vmclone ) {
|
||||
$usbstr .= "<boot order='".$usbboot[$v]."'/>" ;
|
||||
}
|
||||
if ($vmclone ) {
|
||||
if (isset($v["usbboot"]) && $vmclone ) {
|
||||
if ($v["usbboot"] != NULL) $usbstr .= "<boot order='".$v["usbboot"]."'/>" ;
|
||||
}
|
||||
$usbstr .= "</hostdev>";
|
||||
|
||||
@@ -1483,7 +1483,7 @@ private static $encoding = 'UTF-8';
|
||||
*/
|
||||
$uuid = $lv->domain_get_uuid($clone) ;
|
||||
write("addLog\0".htmlspecialchars(_("Checking if clone exists")));
|
||||
if ($uuid) { $arrResponse = ['error' => _("Clone VM name already inuse")]; return $arrResponse ;}
|
||||
if ($uuid) { $arrResponse = ['error' => _("Clone VM name already inuse")]; return false ;}
|
||||
#VM must be shutdown.
|
||||
$res = $lv->get_domain_by_name($vm);
|
||||
$dom = $lv->domain_get_info($res);
|
||||
@@ -1530,7 +1530,7 @@ private static $encoding = 'UTF-8';
|
||||
if ($usb["checked"] == "checked") continue ;
|
||||
unset($usbs[$i]) ;
|
||||
}
|
||||
$config["domain"]["usb"] = $usbs ;
|
||||
$config["usb"] = $usbs ;
|
||||
|
||||
$files_exist = false ;
|
||||
$files_clone = array() ;
|
||||
|
||||
Reference in New Issue
Block a user