summaryrefslogtreecommitdiff
path: root/btrfs-receive-root.sh
diff options
context:
space:
mode:
Diffstat (limited to 'btrfs-receive-root.sh')
-rw-r--r--btrfs-receive-root.sh14
1 files changed, 7 insertions, 7 deletions
diff --git a/btrfs-receive-root.sh b/btrfs-receive-root.sh
index 3dee813..f553c2c 100644
--- a/btrfs-receive-root.sh
+++ b/btrfs-receive-root.sh
@@ -23,13 +23,13 @@ create_layer_filesystem()
23finish() 23finish()
24{ 24{
25 local subv_id 25 local subv_id
26 mv "$mountpoint"/ROOT "$mountpoint"/ROOT.old || return 26 sex mv "$mountpoint"/ROOT "$mountpoint"/ROOT.old || return
27 btrfs subvolume snapshot "$mountpoint"/"$receive_subv" "$mountpoint"/ROOT || return 27 sex btrfs subvolume snapshot "$mountpoint"/"$receive_subv" "$mountpoint"/ROOT || return
28 subv_id=$(btrfs_show_subvolume_id "$mountpoint"/ROOT) || return 28 subv_id=$(btrfs_show_subvolume_id "$mountpoint"/ROOT) || return
29 btrfs subvolume set-default "$subv_id" "$mountpoint" || return 29 sex btrfs subvolume set-default "$subv_id" "$mountpoint" || return
30 btrfs subvolume delete "$mountpoint"/ROOT.old || return 30 sex btrfs subvolume delete "$mountpoint"/ROOT.old || return
31 umount "$mountpoint" || return 31 umount "$mountpoint" || return
32 sex btrfstune -S1 "$layer_file" || return 32 sex btrfstune -S1 "$layer_file" || return
33 losetup -d "$layer_dev" 33 losetup -d "$layer_dev"
34} 34}
35 35