summaryrefslogtreecommitdiffstats
path: root/debian/login.postinst
blob: e91a2d53a898cca5b7d03d73ccf1b680ae03ab03 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/sh
set -e

if [ "$1" = "configure" ]; then
	# Create subuid/subgid if missing
	if [ ! -e "$DPKG_ROOT/etc/subuid" ]; then
		touch "$DPKG_ROOT/etc/subuid"
		chown 0:0 "$DPKG_ROOT/etc/subuid"
		chmod 644 "$DPKG_ROOT/etc/subuid"
	fi

	if [ ! -e "$DPKG_ROOT/etc/subgid" ]; then
		touch "$DPKG_ROOT/etc/subgid"
		chown 0:0 "$DPKG_ROOT/etc/subgid"
		chmod 644 "$DPKG_ROOT/etc/subgid"
	fi
fi

#DEBHELPER#

exit 0