summaryrefslogtreecommitdiffstats
path: root/debian/screen.postinst
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-06 02:20:21 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-06 02:20:21 +0000
commitef3904423d3301d87b4b499b7e5feb359d622405 (patch)
tree981032c10096a70b0cb95ea74de48492f9f08251 /debian/screen.postinst
parentAdding upstream version 4.6.2. (diff)
downloadscreen-debian.tar.xz
screen-debian.zip
Adding debian version 4.6.2-3+deb10u1.debian/4.6.2-3+deb10u1debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/screen.postinst')
-rw-r--r--debian/screen.postinst35
1 files changed, 35 insertions, 0 deletions
diff --git a/debian/screen.postinst b/debian/screen.postinst
new file mode 100644
index 0000000..687579f
--- /dev/null
+++ b/debian/screen.postinst
@@ -0,0 +1,35 @@
+#!/bin/sh
+set -e
+
+. /usr/share/debconf/confmodule
+
+if [ "$1" = configure ]; then
+ if ! test -d /run/screen; then
+ install -g utmp -m 0775 -d /run/screen
+ fi
+ perms="`stat -c%a /usr/bin/screen`"
+ override=/etc/tmpfiles.d/screen-cleanup.conf
+ if [ $perms -eq 4755 ]; then
+ chmod 0755 /run/screen
+ if [ ! -f $override ]; then
+ echo 'd /run/screen 0755 root utmp' > $override
+ fi
+ elif [ $perms -eq 755 ]; then
+ chmod 1777 /run/screen
+ if [ ! -f $override ]; then
+ echo 'd /run/screen 1777 root utmp' > $override
+ fi
+ fi
+
+ # LP #1462692
+ servicedir=/lib/systemd/system
+ servicefile=$servicedir/screen-cleanup.service
+ mkdir -p $servicedir
+ if [ ! -e $servicefile ]; then
+ ln -s /dev/null $servicefile
+ fi
+
+ add-shell /usr/bin/screen || true
+fi
+
+#DEBHELPER#