Avoid sudo during restore.
authorEric Blake <eblake@redhat.com>
Wed, 30 Oct 2019 13:22:48 +0000 (14:22 +0100)
committerEric Blake <eblake@redhat.com>
Wed, 30 Oct 2019 13:22:48 +0000 (14:22 +0100)
Although mknod requires sudo, rm does not.

2019-kvm-forum/restore

index 620e30e..30c9682 100755 (executable)
@@ -9,9 +9,7 @@ if [ "$talkdir" = "" ]; then exit 1; fi
 
 fusermount -u $talkdir/6200-vddk.d/mp >& /dev/null
 
-if [ -d "$talkdir/6400-boot.d/root" ]; then
-    sudo rm -rf $talkdir/6400-boot.d/root
-fi
+rm -rf $talkdir/6400-boot.d/root
 
 sleep 0.5; killall nbdkit >& /dev/null