diff options
author | Jannis Pohlmann <jannis.pohlmann@codethink.co.uk> | 2012-03-27 14:25:16 +0000 |
---|---|---|
committer | Jannis Pohlmann <jannis.pohlmann@codethink.co.uk> | 2012-03-27 14:25:16 +0000 |
commit | 160ccc9e93284ad567f476beb32620bb1e0e33b7 (patch) | |
tree | 4aecd1cbdf579f5466b183cd2a2520a38a1e310f /tb-switch/tb-switch | |
parent | fc8198fff8b634172b48c7dab087da4eb3a5e754 (diff) | |
download | tbdiff-160ccc9e93284ad567f476beb32620bb1e0e33b7.tar.gz |
Add a few btrfs filesystem sync calls for debugging.
Diffstat (limited to 'tb-switch/tb-switch')
-rwxr-xr-x | tb-switch/tb-switch | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tb-switch/tb-switch b/tb-switch/tb-switch index 79568d5..d9e0ad6 100755 --- a/tb-switch/tb-switch +++ b/tb-switch/tb-switch @@ -17,7 +17,6 @@ # vi:set ts=8 sw=8 noet ai nocindent: set -e -set -x # read input parameters device="$1" @@ -49,12 +48,14 @@ fi if [ -e "$target_subvolume-run" ]; then echo "Deleting existing snapshot \"$target_subvolume-run\"" btrfs subvolume delete "$target_subvolume-run" + btrfs filesystem sync . fi echo "Creating snapshot \"$target_subvolume-run\" from \"$target_subvolume\"" # create a a new -run snapshot for the target subvolume btrfs subvolume snapshot "$target_subvolume" "$target_subvolume-run" +btrfs filesystem sync . echo "Copying boot files to the root file system" @@ -62,10 +63,12 @@ echo "Copying boot files to the root file system" busybox cp "$target_subvolume/boot/vmlinuz" "boot/vmlinuz" busybox cp "$target_subvolume/boot/System.map" "boot/System.map" busybox cp "$target_subvolume/extlinux.conf" "extlinux.conf" +btrfs filesystem sync . echo "Configuring extlinux to boot from \"$target_subvolume-run\"" busybox sed -i -e "s,factory-run,$target_subvolume-run,g" "extlinux.conf" +btrfs filesystem sync . # clear the traps trap - EXIT SIGINT SIGTERM |