summaryrefslogtreecommitdiff
path: root/src/initrd/btrfs-create.sh
diff options
context:
space:
mode:
Diffstat (limited to 'src/initrd/btrfs-create.sh')
-rw-r--r--src/initrd/btrfs-create.sh13
1 files changed, 1 insertions, 12 deletions
diff --git a/src/initrd/btrfs-create.sh b/src/initrd/btrfs-create.sh
index efd8728..5ed0f89 100644
--- a/src/initrd/btrfs-create.sh
+++ b/src/initrd/btrfs-create.sh
@@ -43,18 +43,7 @@ cdrom_has_rootfs()
43 43
44losetup_layers() 44losetup_layers()
45{ 45{
46 if cdrom_has_rootfs 46 if [ -e /dev/disk/by-partlabel/samizdat-rootfs ]
47 then
48 # TODO: This is some kind of shortcut or short circuit to find these
49 # files, that ought to be found through the grok-block system (i.e.,
50 # event-driven rather than polling).
51 local fs fs_rw
52 for fs in /cdrom/rootfs/*.btrfs; do
53 fs_rw=/"${fs##*/}".rw
54 dd if=/dev/zero of="$fs_rw" bs=1M count=10
55 losetup_snapshot "$fs" "$fs_rw" || return
56 done
57 elif [ -e /dev/disk/by-partlabel/samizdat-rootfs ]
58 then 47 then
59 # TODO: prevent raciness 48 # TODO: prevent raciness
60 umount /dev/disk/by-partlabel/samizdat-rootfs 49 umount /dev/disk/by-partlabel/samizdat-rootfs