From e2f3fe9c927f19bf739cf3271790928145e21deb Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Mon, 8 Jul 2019 21:53:18 +0200 Subject: [PATCH] Add postinst-setup-ostree --- postinst-setup-ostree | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100755 postinst-setup-ostree diff --git a/postinst-setup-ostree b/postinst-setup-ostree new file mode 100755 index 0000000..2ed3890 --- /dev/null +++ b/postinst-setup-ostree @@ -0,0 +1,24 @@ +#!/bin/sh +set -ex + +# have schroot use tmpfs +if [ ! -L /var/lib/schroot/unpack ]; then + rmdir /var/lib/schroot/unpack || true + ln -s /tmp /var/lib/schroot/unpack +fi + +# create user +if ! grep -q ^mock: /etc/group; then + getent group mock | sed 's/$/martin/' >> /etc/group +fi + +# copy back NM connections and fix SELinux context +cp /home/martin/archiv/system-config/* /etc/ +chcon -R -t NetworkManager_etc_t -u system_u /etc/NetworkManager +chcon -R -t NetworkManager_etc_rw_t -u system_u /etc/NetworkManager/NetworkManager.conf /etc/NetworkManager/system-connections + +# crontabs +crontab -u martin - </dev/null +EOF -- 2.39.5