aboutsummaryrefslogtreecommitdiff
path: root/upload-machine
diff options
context:
space:
mode:
Diffstat (limited to 'upload-machine')
-rwxr-xr-xupload-machine11
1 files changed, 5 insertions, 6 deletions
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