[Pkg-libvirt-maintainers] Bug#844339: [PATCH v2 1/4] libvirt-daemon-system.post{inst, rm}: quiet output for debconf
Mauricio Faria de Oliveira
mauricfo at linux.vnet.ibm.com
Thu Nov 17 12:51:39 UTC 2016
Add some --quiet arguments and /dev/null redirects
in order to make the scripts safe for debconf.
Signed-off-by: Mauricio Faria de Oliveira <mauricfo at linux.vnet.ibm.com>
---
debian/libvirt-daemon-system.postinst | 8 ++++----
debian/libvirt-daemon-system.postrm | 6 +++---
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/debian/libvirt-daemon-system.postinst b/debian/libvirt-daemon-system.postinst
index d0d670d..99e9fec 100644
--- a/debian/libvirt-daemon-system.postinst
+++ b/debian/libvirt-daemon-system.postinst
@@ -20,7 +20,7 @@ set -e
add_users_groups()
{
if ! getent group libvirt >/dev/null; then
- addgroup --system libvirt
+ addgroup --quiet --system libvirt
fi
if ! getent group kvm >/dev/null; then
@@ -41,7 +41,7 @@ add_users_groups()
fi
if ! getent group libvirt-qemu >/dev/null; then
addgroup --quiet --system libvirt-qemu
- adduser libvirt-qemu libvirt-qemu
+ adduser --quiet libvirt-qemu libvirt-qemu
fi
}
@@ -106,8 +106,8 @@ case "$1" in
# Force virtlockd to reexec if enabled
if [ -d /run/systemd/system ]; then
- ! systemctl is-active -q virtlogd || systemctl reload virtlogd.service
- ! systemctl is-active -q virtlockd || systemctl reload virtlockd.service
+ ! systemctl is-active -q virtlogd || systemctl reload virtlogd.service >/dev/null
+ ! systemctl is-active -q virtlockd || systemctl reload virtlockd.service >/dev/null
fi
# Force refresh of capabilties (#731815)
diff --git a/debian/libvirt-daemon-system.postrm b/debian/libvirt-daemon-system.postrm
index 62d9b4b..179ed93 100644
--- a/debian/libvirt-daemon-system.postrm
+++ b/debian/libvirt-daemon-system.postrm
@@ -22,15 +22,15 @@ set -e
case "$1" in
purge)
if getent group libvirt >/dev/null; then
- delgroup libvirt || true
+ delgroup libvirt >/dev/null || true
fi
if getent passwd libvirt-qemu >/dev/null; then
- deluser libvirt-qemu || true
+ deluser libvirt-qemu >/dev/null || true
fi
if getent group libvirt-qemu >/dev/null; then
- delgroup libvirt-qemu || true
+ delgroup libvirt-qemu >/dev/null || true
fi
# Clean up logs and cached capabilities
--
2.10.2
More information about the Pkg-libvirt-maintainers
mailing list