FAQ | This is a LIVE service | Changelog

Commit 73ad8e1d authored by Dr Adam Thorn's avatar Dr Adam Thorn
Browse files

Ignore non-zero exit from systemd-detect-virt in prepare script

As of b4b89ed3 we need the prepare script to exit zero on success.

We only use the stdout from this command, not the return code, for
determining if the target is a xen VM.
parent b4b89ed3
......@@ -3,6 +3,6 @@ Priority: optional
Section: otherosfs
Maintainer: Chemistry COs <support@ch.cam.ac.uk>
Architecture: all
Version: 0.9-ch94
Version: 0.9-ch95
Depends: zfs-dkms, postgresql-13 | postgresql-9.5 | postgresql-9.4 , liblockfile-simple-perl, libdbi-perl, libjson-perl, libzfs-perl-chem, libnet-openssh-perl, libdbd-pg-perl, mbuffer, rsync, nfs-kernel-server, pv, libwww-curl-perl
Description: a backup system using ZFS (repository 'backup-scheduler')
......@@ -54,7 +54,11 @@ fi
# provided by it.
# systemd-detect-virt is present on all our Ubuntu VMs so is hopefully a
# reliable method to use
# NB this returns non-zero on a non-virtual machine so we don't mind
# the return value
set +e
VIRT_TYPE=$(ssh root@$SERVER systemd-detect-virt 2>/dev/null)
set -e
if [ "$VIRT_TYPE" == "xen" ] ; then
cat<<EOF >> $CONFDIR/$SERVER/exclude
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment