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

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



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.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


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