[Bug 457607] [NEW] cron errors: grep: /etc/libvirt/qemu/*.xml: No such file or directory

Loïc Minier lool at dooz.org
Wed Oct 21 21:27:36 BST 2009


Public bug reported:

Hi

I got a mail from cron this night:
/etc/cron.daily/libvirt-bin:                                                    
grep: /etc/libvirt/qemu/*.xml: No such file or directory                        

Looking at /etc/cron.daily/libvirt-bin:

for i in /etc/libvirt/qemu/*.xml ; do
    uuid=`grep '<uuid>' "$i" | sed 's#.*<uuid>\(.*\)</uuid>.*#\1#'`
    uuids="$uuids $uuid"
done

I can reproduce with:
sh -c 'for i in /etc/foo*bar; do echo $i; done'
/etc/foo*bar

Proposed change, add a backtick expansion and call ls; i.e.:
for i in `ls /etc/libvirt/qemu/*.xml 2>/dev/null`; do

Note that this continues execution even in set -e mode:
sh -c 'set -e; for i in `ls /etc/foo*bar 2>/dev/null`; do echo $i; done; echo true'

Thanks,

ProblemType: Bug
Architecture: amd64
Date: Wed Oct 21 22:21:58 2009
DistroRelease: Ubuntu 9.10
Package: libvirt-bin 0.7.0-1ubuntu12
ProcEnviron:
 SHELL=/bin/zsh
 PATH=(custom, user)
 LANG=fr_FR.UTF-8
ProcVersionSignature: Ubuntu 2.6.31-11.38-generic
SourcePackage: libvirt
Uname: Linux 2.6.31-11-generic x86_64

** Affects: libvirt (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: amd64 apport-bug

-- 
cron errors: grep: /etc/libvirt/qemu/*.xml: No such file or directory
https://bugs.launchpad.net/bugs/457607
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to libvirt in ubuntu.



More information about the Ubuntu-server-bugs mailing list