[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCH] virt-sanlock-cleanup; Fix augtool usage



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 sysconfdir@/libvirt/qemu-sanlock.conf/disk_lease_dir'`
> >> +LOCKDIR=`augtool get '/files 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 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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]