add DEBIAN
This commit is contained in:
parent
d1f55c4871
commit
b085ab6e4c
5 changed files with 126 additions and 0 deletions
1
DEBIAN/conffiles
Normal file
1
DEBIAN/conffiles
Normal file
|
@ -0,0 +1 @@
|
|||
/etc/mkbackup-btrfs.conf.d/guestsession.conf
|
12
DEBIAN/control
Normal file
12
DEBIAN/control
Normal file
|
@ -0,0 +1,12 @@
|
|||
Package: guestsession
|
||||
Version: 0.1.49
|
||||
Section: misc
|
||||
Priority: extra
|
||||
Architecture: all
|
||||
Maintainer: Jakobus Schürz <xundeenergie@gmail.com>
|
||||
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
|
64
DEBIAN/postinst
Executable file
64
DEBIAN/postinst
Executable file
|
@ -0,0 +1,64 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
# summary of how this script can be called:
|
||||
# * <postinst> `configure' <most-recently-configured-version>
|
||||
# * <old-postinst> `abort-upgrade' <new version>
|
||||
# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
|
||||
# <new-version>
|
||||
# * <postinst> `abort-remove'
|
||||
# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
|
||||
# <failed-install-package> <version> `removing'
|
||||
# <conflicting-package> <version>
|
||||
# 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
|
44
DEBIAN/postrm
Executable file
44
DEBIAN/postrm
Executable file
|
@ -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
|
5
DEBIAN/prerm
Executable file
5
DEBIAN/prerm
Executable file
|
@ -0,0 +1,5 @@
|
|||
#! /bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
systemctl stop guest-session@Gast.service
|
Loading…
Reference in a new issue