From: Eric Blake Date: Wed, 30 Oct 2019 13:22:48 +0000 (+0100) Subject: Avoid sudo during restore. X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;h=485dd89c0b466f40dc1937db62c2e53b4c8b8e15;p=libguestfs-talks.git Avoid sudo during restore. Although mknod requires sudo, rm does not. --- diff --git a/2019-kvm-forum/restore b/2019-kvm-forum/restore index 620e30e..30c9682 100755 --- a/2019-kvm-forum/restore +++ b/2019-kvm-forum/restore @@ -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