libvirt/tools
Christian Ehrhardt ab5b5f22b9
tools: fix libvirt-guests.sh text assignments
In libvirt 6.6 stopping guests with libvirt-guests.sh is broken.
As soon as there is more than one guest one can see
`systemctl stop libvirt-guests` failing and in the log we see:
  libvirt-guests.sh[2455]: Running guests on default URI:
  libvirt-guests.sh[2457]: /usr/lib/libvirt/libvirt-guests.sh: 120:
      local: 2a49cb0f-1ff8-44b5-a61d-806b9e52dae2: bad variable name
  libvirt-guests.sh[2462]: no running guests.

That is due do mutliple guests becoming a list of UUIDs. Without
recognizing this as one single string the assignment breaks when using 'local'
(which was recently added in 6.3.0). This is because local is defined as
  local [option] [name[=value] ... | - ]
which makes the shell trying handle the further part of the string as
variable names. In the error above that string isn't a valid variable
name triggering the issue that is seen.

This depends on the shell being used. POSIX shells don't have 'local'
specified yet and for the common shells it depends. It worked in bash and
bash-in-POSIX-mode, but for example dash in POSIX mode triggers the issue.

To resolve that 'textify' all assignments that are strings or potentially
can become such lists (even if they are not using the local qualifier).

Fixes: 08071ec0 "tools: variables clean-up in libvirt-guests script"

Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
2020-08-21 08:31:18 +02:00
..
bash-completion meson: tools: install bash-completion files 2020-08-03 09:27:05 +02:00
nss meson: tests: add nss specific tests 2020-08-03 09:27:06 +02:00
wireshark meson: tools/wireshark: build libvirt.so wireshark module 2020-08-03 09:27:05 +02:00
libvirt_recover_xattrs.sh security_util: Remove stale XATTRs 2019-08-22 17:05:17 +02:00
libvirt_win_icon_16x16.ico
libvirt_win_icon_32x32.ico
libvirt_win_icon_48x48.ico
libvirt_win_icon_64x64.ico
libvirt-guests.service.in build: don't hardcode /etc in the config related files 2019-08-09 14:06:31 +01:00
libvirt-guests.sh.in tools: fix libvirt-guests.sh text assignments 2020-08-21 08:31:18 +02:00
libvirt-guests.sysconf systemd: Tweak existing sysconf files 2020-04-03 11:50:35 +02:00
meson.build meson: tools: introduce wireshark directory 2020-08-03 09:27:05 +02:00
virsh_win_icon.rc
virsh-backup.c backup: Implement virsh support for backup 2019-12-10 12:41:56 +01:00
virsh-backup.h backup: Implement virsh support for backup 2019-12-10 12:41:56 +01:00
virsh-checkpoint.c Use g_strfeev instead of virStringFreeList 2020-08-03 15:37:36 +02:00
virsh-checkpoint.h backup: Implement virsh support for checkpoints 2019-07-26 16:48:58 -05:00
virsh-completer-checkpoint.c tools: use g_strdup instead of VIR_STRDUP 2019-10-21 12:51:59 +02:00
virsh-completer-checkpoint.h tools: Separate checkpoint related completers into a file 2019-08-09 09:18:19 +02:00
virsh-completer-domain.c virsh: Expose virDomainGetHostnameFlags 2020-01-16 09:02:35 +01:00
virsh-completer-domain.h virsh: Expose virDomainGetHostnameFlags 2020-01-16 09:02:35 +01:00
virsh-completer-host.c virsh: completer: use signed variable for XPathNodeSet errors 2020-08-03 15:19:29 +02:00
virsh-completer-host.h tools: Separate host related completers into a file 2019-08-09 09:17:44 +02:00
virsh-completer-interface.c tools: use g_strdup instead of VIR_STRDUP 2019-10-21 12:51:59 +02:00
virsh-completer-interface.h tools: Separate interface related completers into a file 2019-08-09 09:07:51 +02:00
virsh-completer-network.c tools: remove unneeded cleanup labels 2019-11-12 17:54:01 +01:00
virsh-completer-network.h tools: Separate network related completers into a file 2019-08-09 09:09:59 +02:00
virsh-completer-nodedev.c Drop needless ret variable 2019-10-24 08:10:37 +02:00
virsh-completer-nodedev.h tools: Separate nodedev related completers into a file 2019-08-09 09:10:08 +02:00
virsh-completer-nwfilter.c tools: use g_strdup instead of VIR_STRDUP 2019-10-21 12:51:59 +02:00
virsh-completer-nwfilter.h tools: Separate nwfilter related completers into a file 2019-08-09 09:15:36 +02:00
virsh-completer-pool.c Drop needless ret variable 2019-10-24 08:10:37 +02:00
virsh-completer-pool.h virsh: Introduce virshPoolTypeCompleter 2019-08-09 09:20:13 +02:00
virsh-completer-secret.c virsh: Work around virSecretFree quirks 2020-01-28 18:09:57 +01:00
virsh-completer-secret.h tools: Separate secret related completers into a file 2019-08-09 09:16:28 +02:00
virsh-completer-snapshot.c tools: use g_strdup instead of VIR_STRDUP 2019-10-21 12:51:59 +02:00
virsh-completer-snapshot.h tools: Separate snapshot related completers into a file 2019-08-09 09:17:06 +02:00
virsh-completer-volume.c tools: use g_strdup instead of VIR_STRDUP 2019-10-21 12:51:59 +02:00
virsh-completer-volume.h tools: Separate storage volume related completers into a file 2019-08-09 09:07:02 +02:00
virsh-completer.c tools: Use g_strdup_printf() instead of virAsprintf() 2019-11-12 16:15:59 +01:00
virsh-completer.h virsh-completer: Drop needless #include 2019-08-09 09:18:54 +02:00
virsh-console.c use g_ascii_toupper instead of c_toupper from gnulib 2019-12-10 13:49:24 +01:00
virsh-console.h tools: use #pragma once in headers 2019-06-19 17:12:34 +02:00
virsh-domain-monitor.c tools: remove unnecessary includes 2020-08-03 15:30:40 +02:00
virsh-domain-monitor.h virsh: Fix virshDomainInterfaceSourceCompleter 2020-01-07 16:12:55 +01:00
virsh-domain.c Use g_strfeev instead of virStringFreeList 2020-08-03 15:37:36 +02:00
virsh-domain.h virsh: Expose virDomainGetHostnameFlags 2020-01-16 09:02:35 +01:00
virsh-edit.c Use G_GNUC_FALLTHROUGH instead of ATTRIBUTE_FALLTHROUGH 2019-10-15 16:14:19 +02:00
virsh-host.c Use g_strfeev instead of virStringFreeList 2020-08-03 15:37:36 +02:00
virsh-host.h tools: remove unnecessary includes 2020-08-03 15:30:40 +02:00
virsh-interface.c tools: remove unnecessary includes 2020-08-03 15:30:40 +02:00
virsh-interface.h tools: use #pragma once in headers 2019-06-19 17:12:34 +02:00
virsh-network.c tools: remove unnecessary includes 2020-08-03 15:30:40 +02:00
virsh-network.h tools: use #pragma once in headers 2019-06-19 17:12:34 +02:00
virsh-nodedev.c Use g_strfeev instead of virStringFreeList 2020-08-03 15:37:36 +02:00
virsh-nodedev.h tools: s/Nodedev/NodeDevice/ 2019-08-09 09:03:53 +02:00
virsh-nwfilter.c tools: remove unnecessary includes 2020-08-03 15:30:40 +02:00
virsh-nwfilter.h tools: use #pragma once in headers 2019-06-19 17:12:34 +02:00
virsh-pool.c Use g_strfeev instead of virStringFreeList 2020-08-03 15:37:36 +02:00
virsh-pool.h tools: use #pragma once in headers 2019-06-19 17:12:34 +02:00
virsh-secret.c tools: remove unnecessary includes 2020-08-03 15:30:40 +02:00
virsh-secret.h tools: remove unnecessary includes 2020-08-03 15:30:40 +02:00
virsh-snapshot.c Use g_strfeev instead of virStringFreeList 2020-08-03 15:37:36 +02:00
virsh-snapshot.h tools: remove unnecessary includes 2020-08-03 15:30:40 +02:00
virsh-util.c virsh: Work around virSecretFree quirks 2020-01-28 18:09:57 +01:00
virsh-util.h virsh: Work around virSecretFree quirks 2020-01-28 18:09:57 +01:00
virsh-volume.c tools: remove unnecessary includes 2020-08-03 15:30:40 +02:00
virsh-volume.h tools: use #pragma once in headers 2019-06-19 17:12:34 +02:00
virsh.c meson: drop debug_logs configure argument 2020-08-03 09:26:28 +02:00
virsh.h tools: remove unnecessary includes 2020-08-03 15:30:40 +02:00
virt-admin-completer.c tools: remove unnecessary includes 2020-08-03 15:30:40 +02:00
virt-admin-completer.h tools: use #pragma once in headers 2019-06-19 17:12:34 +02:00
virt-admin.c tools: remove unnecessary includes 2020-08-03 15:30:40 +02:00
virt-admin.h tools: use #pragma once in headers 2019-06-19 17:12:34 +02:00
virt-host-validate-bhyve.c virt-host-validate-bhyve.c: Reintroduce @ret to virHostValidateBhyve() 2020-05-05 14:45:58 +02:00
virt-host-validate-bhyve.h tools: use #pragma once in headers 2019-06-19 17:12:34 +02:00
virt-host-validate-common.c tools: Secure guest check for AMD in virt-host-validate 2020-06-16 09:43:44 +02:00
virt-host-validate-common.h tools: Secure guest check for AMD in virt-host-validate 2020-06-16 09:43:44 +02:00
virt-host-validate-lxc.c virt-host-validate: require freezer for LXC 2018-10-05 15:53:29 +02:00
virt-host-validate-lxc.h tools: use #pragma once in headers 2019-06-19 17:12:34 +02:00
virt-host-validate-qemu.c tools: remove unnecessary includes 2020-08-03 15:30:40 +02:00
virt-host-validate-qemu.h tools: use #pragma once in headers 2019-06-19 17:12:34 +02:00
virt-host-validate.c src: More cleanup of some system headers already contained in internal.h 2018-09-20 10:16:39 +02:00
virt-login-shell-helper.c Use g_strfeev instead of virStringFreeList 2020-08-03 15:37:36 +02:00
virt-login-shell.c build: generate configmake.h in root directory 2020-01-29 14:51:39 +00:00
virt-login-shell.conf virt-login-shell: add ability to auto-detect shell from container 2016-06-10 11:03:02 +01:00
virt-pki-validate.in tools: Fix permissions for virt-pki-validate.in 2019-07-01 17:20:32 +02:00
virt-sanlock-cleanup.in build: Extract pod from source files 2016-04-25 15:40:43 +02:00
virt-xml-validate.in tools: fix XML validator detection of network port XML schema 2019-09-12 16:06:57 +01:00
vsh-table.c tools: remove unnecessary includes 2020-08-03 15:30:40 +02:00
vsh-table.h tools: use #pragma once in headers 2019-06-19 17:12:34 +02:00
vsh.c tools: avoid potential null pointer dereference by GCC 10 2020-08-17 08:25:28 +02:00
vsh.h tools: remove unnecessary includes 2020-08-03 15:30:40 +02:00