aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2021-10-15 13:27:38 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2021-10-15 13:27:38 +0200
commit6cee1e09b17453f987abc33215462cf0d01c690b (patch)
tree74b5ba0c6d643e2af7701edd8de8f73d47d4d9ae
parent18e8736a93b252465ca537e978c5b0b8a3219751 (diff)
Minor script improvements
-rwxr-xr-xtest-machine3
-rwxr-xr-xupload-machine11
2 files changed, 8 insertions, 6 deletions
diff --git a/test-machine b/test-machine
index 3d55d94..c7e279a 100755
--- a/test-machine
+++ b/test-machine
@@ -73,6 +73,9 @@ fi
-drive "if=none,id=disk0,file=$dir/disk.img,format=raw" \
-device "virtio-blk-pci,scsi=off,drive=disk0" \
\
+ -usb \
+ -device usb-tablet \
+ \
-chardev stdio,id=qmp \
-mon chardev=qmp,mode=control,pretty=on \
\
diff --git a/upload-machine b/upload-machine
index 8d6e730..5d4e6b7 100755
--- a/upload-machine
+++ b/upload-machine
@@ -86,20 +86,19 @@ oldsv_host="$machines/$mname/$oldsv_name"
# Make sure subvolumes are read-only.
#
-function check_ro () # <subvol>
+function make_ro () # <subvol>
{
local r;
r="$(btrfs property get -ts "$1" ro)"
if [ "$r" != "ro=true" ]; then
- info "subvolume '$1' is not read-only; to change, run:"
- info " btrfs property set -ts $1 ro true"
- exit 1
+ info "subvolume '$1' is read-write, changing to read-only"
+ btrfs property set -ts "$1" ro true
fi
}
-check_ro "$newsv"
+make_ro "$newsv"
if [ -n "$oldsv" ]; then
- check_ro "$oldsv"
+ make_ro "$oldsv"
fi
# btrfs send command