6 # Avoid GNOME keyring stupidity
7 export GNOME_KEYRING_CONTROL=
8 export GNOME_KEYRING_PID=
15 # Check the files are precreated.
16 if [ ! -f 1000-loopback-mounting.d/fedora-29.img ]; then
17 pushd 1000-loopback-mounting.d
18 virt-builder fedora-29
22 if [ ! -f 2000-xz-compressed.d/Fedora-Cloud-Base-29-1.2.x86_64.raw.xz ]; then
23 pushd 2000-xz-compressed.d
24 wget https://download.fedoraproject.org/pub/fedora/linux/releases/29/Cloud/x86_64/images/Fedora-Cloud-Base-29-1.2.x86_64.raw.xz
28 if [ ! -f 3500-partitioning.d/boot.img ]; then
29 guestfish --ro -a 1000-loopback-mounting.d/fedora-29.img -i <<EOF
30 download /dev/sda2 3500-partitioning.d/boot.img
31 download /dev/sda3 3500-partitioning.d/swap.img
32 # Save to hidden file.
33 download /dev/sda4 3500-partitioning.d/.root.img
37 # Restore original root.img before each run.
38 if ! cmp -s 3500-partitioning.d/{.root.img,root.img}; then
39 cp 3500-partitioning.d/{.root.img,root.img}
45 # Check nbd module is loaded.
48 # Remove any old mounts, nbdkit processes etc.
53 ~/d/techtalk-pse/techtalk-pse