#!/bin/sh

set -e

# Enable machines.target by default on new installs
if [ -z "$2" ]; then
    systemctl enable machines.target || true
fi

# Automatically added by dh_installtmpfiles/13.6ubuntu1
if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then
	# In case this system is running systemd, we need to ensure that all
	# necessary tmpfiles (if any) are created before starting.
	if [ -z "${DPKG_ROOT:-}" ] && [ -d /run/systemd/system ] ; then
		systemd-tmpfiles --create portables.conf systemd-nspawn.conf >/dev/null || true
	fi
fi
# End automatically added section

