diff --git a/applets/compiler_vm/host/devices/add-serials b/applets/compiler_vm/host/devices/add-serials index 26d143ca..aaebf5b9 100755 --- a/applets/compiler_vm/host/devices/add-serials +++ b/applets/compiler_vm/host/devices/add-serials @@ -4,12 +4,23 @@ DOMAIN="${PBOTVM_DOMAIN:-pbot-vm}" SERIAL="${PBOTVM_SERIAL:-5555}" HEART="${PBOTVM_HEART:-5556}" -install_serial() { - file=$1 port=$2 - sed -i.1 "s/[\$]PORT[\$]/$port/" $file - virsh attach-device --config $DOMAIN $file - mv $file.1 $file -} +cat > serial-2.xml < + + + + +EOF -install_serial serial-2.xml $SERIAL -install_serial serial-3.xml $HEART +cat > serial-3.xml < + + + + +EOF + +virsh attach-device --config $DOMAIN serial-2.xml +virsh attach-device --config $DOMAIN serial-3.xml + +rm serial-[23].xml diff --git a/applets/compiler_vm/host/devices/serial-2.xml b/applets/compiler_vm/host/devices/serial-2.xml deleted file mode 100644 index 7d9e08ef..00000000 --- a/applets/compiler_vm/host/devices/serial-2.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/applets/compiler_vm/host/devices/serial-3.xml b/applets/compiler_vm/host/devices/serial-3.xml deleted file mode 100644 index 34f0e1b7..00000000 --- a/applets/compiler_vm/host/devices/serial-3.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - -