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

[libvirt] [PATCH 0/4] white space handling in libvirt-guest.init script

libvirt-guest doesn't correctly handle the case, that the domain name
contains blanks, when it parses the output of "virsh dominfo | grep Name".

While investigating this this bug, I took the opportunity to also fix
several other potential quoting problems in libvirt-guest.init. Those
further changes might be controversial, since most variables will never
contain characters from IFS, but since I encountered several problems
with scripts not quoting variables in the past, I personally tend to
quote almost every variable which must contains exactly one single

The last patch is not for application, but since I had to do it anyway,
I'll include it for others for inspiration.

So #1 is the most important, #2 and #3 depends on your preferred style,
and #4 is just FYI only.

Philipp Hahn (4):
  libvirt-guest.init: handle domain name with spaces
  libvirt-guest.init: quoting variables
  libvirt-guest.init: declare variables as local
  libvirt-guest.init: Use lsb-init functions

 tools/libvirt-guests.init.sh |  145 
 1 files changed, 77 insertions(+), 68 deletions(-)

Philipp Hahn
Philipp Hahn           Open Source Software Engineer      hahn univention de
Univention GmbH        Linux for Your Business        fon: +49 421 22 232- 0
Mary-Somerville-Str.1  28359 Bremen                   fax: +49 421 22 232-99

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