restore: Unmount floppy from mountpoint automatically.
[libguestfs-talks.git] / 2019-fosdem / restore
1 #!/bin/bash -
2 # Unmount everything.
3
4 sudo umount /tmp/mnt         >&/dev/null
5 sudo umount /run/media/rjones/NBDKITFLOPY/ >&/dev/null
6
7 sudo mdadm --stop /dev/md0   >&/dev/null
8
9 sudo nbd-client -d /dev/nbd0 >&/dev/null
10 sudo nbd-client -d /dev/nbd1 >&/dev/null
11 sudo nbd-client -d /dev/nbd2 >&/dev/null
12 sudo nbd-client -d /dev/nbd3 >&/dev/null
13 sudo nbd-client -d /dev/nbd4 >&/dev/null
14
15 sudo kpartx -d /dev/loop0    >&/dev/null
16 sudo losetup -d /dev/loop0   >&/dev/null
17
18 killall nbdkit               >&/dev/null
19 killall wish                 >&/dev/null
20
21 exit 0