diff --git a/DEBIAN/conffiles b/DEBIAN/conffiles new file mode 100644 index 0000000..bbc853c --- /dev/null +++ b/DEBIAN/conffiles @@ -0,0 +1 @@ +/etc/mkbackup-btrfs.conf.d/guestsession.conf diff --git a/DEBIAN/control b/DEBIAN/control new file mode 100644 index 0000000..d32062e --- /dev/null +++ b/DEBIAN/control @@ -0,0 +1,12 @@ +Package: guestsession +Version: 0.1.49 +Section: misc +Priority: extra +Architecture: all +Maintainer: Jakobus Schürz +Homepage: http://github.com/xundeenergie/guestsession +Provides: guestsession +Depends: systemd, adduser, deb-systemd-helper-new +Recommends: btrfs-progs +Description: Gastzugang im Kioskmodus + Stellt einen Gastzugang bereit, bei dem das Home-Verzeichnis bei jedem Logout gelöscht und bei jedem Login neu erstellt wird. In Abhängigkeit des Vorhandenseins eines btrfs-Filesystem im Zielverzeichnis von Home wird dieses mittels Erstellung eines Subvolumes gelöst. Es sind mehrere Gastzugänge mit unterschiedlicher Konfiguration (z.b. verschiedene Desktop-Sprachen) möglich. Aktiviert wird der Gastzugang über systemd diff --git a/DEBIAN/postinst b/DEBIAN/postinst new file mode 100755 index 0000000..0611268 --- /dev/null +++ b/DEBIAN/postinst @@ -0,0 +1,64 @@ +#!/bin/sh + +set -e + +# summary of how this script can be called: +# * `configure' +# * `abort-upgrade' +# * `abort-remove' `in-favour' +# +# * `abort-remove' +# * `abort-deconfigure' `in-favour' +# `removing' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + +# source debconf library +. /usr/share/debconf/confmodule + +case "$1" in + + configure) +# #deb-systemd-helper-xe unmask guest-session@Gast.service >/dev/null || true +# systemctl unmask guest-session@Gast.service +# systemctl disable guest-session@Gast.service +# systemctl enable guest-session@Gast.service +# systemctl start guest-session@Gast.service + + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + exit 0 + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; + +esac + +#echo "Noch was" +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +##DEBHELPER# +deb-systemd-helper-new unmask guest-session@Gast.service >/dev/null || true +# +## was-enabled defaults to true, so new installations run enable. +if deb-systemd-helper-new --quiet was-enabled guest-session@Gast.service; then + # Enables the unit on first installation, creates new + # symlinks on upgrades if the unit file has changed. + deb-systemd-helper-new enable guest-session@Gast.service >/dev/null || true +else + # Update the statefile to add new symlinks (if any), which need to be + # cleaned up on purge. Also remove old symlinks. + deb-systemd-helper-new update-state guest-session@Gast.service >/dev/null || true +fi +# +# + +#db_stop + +exit 0 diff --git a/DEBIAN/postrm b/DEBIAN/postrm new file mode 100755 index 0000000..23a2e74 --- /dev/null +++ b/DEBIAN/postrm @@ -0,0 +1,44 @@ +#! /bin/sh + +set -e +_DEB_SYSTEMD_HELPER_DEBUG=1 + +# In case this system is running systemd, we make systemd reload the unit files +# to pick up changes. +if [ -d /run/systemd/system ] ; then + systemctl --system daemon-reload >/dev/null || true +fi +case "$1" in + purge) + #rm -rf /lib/systemd/system/guest-session@.service + + #rm -f /etc/cups/printers.conf* /etc/cups/classes.conf* + #rmdir /etc/cups 2>/dev/null || true +# if [ -x "/usr/bin/deb-systemd-helper-xe" ]; then +# #deb-systemd-helper-xe purge cups.path cups.service cups.socket >/dev/null + deb-systemd-helper-new purge guest-sesseion@Gast.service >/dev/null + deb-systemd-helper-new unmask guest-sesseion@Gast.service >/dev/null +# fi + ;; + abort-upgrade) +# if [ -e /etc/cups/cupsd.conf.conffile-bak ]; then +# # Move cupsd.conf back +# mv /etc/cups/cupsd.conf.conffile-bak /etc/cups/cupsd.conf +# fi + ;; + remove) + #systemctl stop guest-session@Gast.service + #systemctl disable guest-session@.service + #ln -s /dev/null /lib/systemd/system/guest-session@.service + if [ -x "/usr/bin/deb-systemd-helper-xe" ]; then + deb-systemd-helper-new mask guest-sesseion@Gast.service >/dev/null + fi + ;; + upgrade|failed-upgrade|abort-install|disappear) + ;; + + *) + echo "postrm called with unknown argument \`$1'" >&2 + exit 0 + +esac diff --git a/DEBIAN/prerm b/DEBIAN/prerm new file mode 100755 index 0000000..6c709f1 --- /dev/null +++ b/DEBIAN/prerm @@ -0,0 +1,5 @@ +#! /bin/sh + +set -e + +systemctl stop guest-session@Gast.service