mirror of
https://github.com/unraid/webgui.git
synced 2026-04-20 17:02:10 -05:00
Update rc.libvirt
This commit is contained in:
+6
-4
@@ -159,7 +159,9 @@ waitstop() {
|
||||
return 1
|
||||
}
|
||||
|
||||
function version { echo "$@" | awk -F. '{ printf("%d%03d%03d%03d\n", $1,$2,$3,$4); }'; }
|
||||
version() {
|
||||
echo $1 | awk -F. '{printf("%d%03d%03d%03d", $1,$2,$3,$4);}'
|
||||
}
|
||||
|
||||
start_libvirtd() {
|
||||
if [[ -f $LIBVIRTD_PIDFILE ]]; then
|
||||
@@ -174,9 +176,9 @@ start_libvirtd() {
|
||||
sed -ri "s/<vendor id='none'\/>/<vendor_id state='on' value='none'\/>/g" /etc/libvirt/qemu/*.xml &> /dev/null
|
||||
# remove <locked/> from xml because libvirt + virlogd + virlockd has an issue with locked
|
||||
sed -ri "s/<locked\/>//g" /etc/libvirt/qemu/*.xml &> /dev/null
|
||||
# Remove "<watchdog model='itco' action='reset'/>" if rerting from later release.
|
||||
VERSION=$(sed -n 's/.*version *= *\"\([^ ]*.*\)\"/\1/p' < /etc/unraid-version)
|
||||
if [ $(version $VERSION) -le $(version "6.12.9") ]; then
|
||||
# Remove "<watchdog model='itco' action='reset'/>" if reverting from later release.
|
||||
. /etc/unraid-version
|
||||
if [[ $(version $version) -le $(version "6.12.9") ]]; then
|
||||
sed -ri "/<watchdog model='itco' action='reset'\/>/d" /etc/libvirt/qemu/*.xml &> /dev/null
|
||||
fi
|
||||
# update interface section((s) of VM configuration files
|
||||
|
||||
Reference in New Issue
Block a user