[libvirt] [PATCH] virt-sanlock-cleanup; Fix augtool usage
Jiri Denemark
jdenemar at redhat.com
Wed Aug 28 12:54:38 UTC 2013
On Wed, Aug 28, 2013 at 06:38:26 -0600, Eric Blake wrote:
> On 08/28/2013 05:58 AM, Jiri Denemark wrote:
>
> >> +++ b/tools/virt-sanlock-cleanup.in
> >> @@ -26,7 +26,8 @@ fi
> >>
> >> LOCKSPACE="__LIBVIRT__DISKS__"
> >>
> >> -LOCKDIR=`augtool print '/files at sysconfdir@/libvirt/qemu-sanlock.conf/disk_lease_dir'`
> >> +LOCKDIR=`augtool get '/files at sysconfdir@/libvirt/qemu-sanlock.conf/disk_lease_dir'`
> >> +LOCKDIR=${LOCKDIR#* = }
> >
> > I'm not sure if this is a bashism or not but in case it is, we may need
> > to filter the output with sed instead:
> >
> > LOCKDIR=`augtool get '/files at sysconfdir@/libvirt/qemu-sanlock.conf/disk_lease_dir' \
> > | sed -e 's/.* = //'`
>
> Fortunately, ${foo#pattern} is portable to POSIX, so you are just fine
> doing it in shell without needing a sed.
>
> ACK to the original version.
Pushed, thanks.
Jirka
More information about the libvir-list
mailing list