File: postinst

package info (click to toggle)
rpcbind 1.2.5-8
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 996 kB
  • sloc: ansic: 5,607; sh: 1,350; makefile: 72
file content (17 lines) | stat: -rw-r--r-- 475 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/sh

set -e

if [ "$1" = configure ] ; then
	# run daemon as non-root (see #852066)
	adduser --force-badname --system --quiet --home /run/rpcbind --no-create-home _rpc
	if dpkg --compare-versions "$2" lt "1.2.5-0.1~"; then
		if [ -d /run/rpcbind ]; then
			chown _rpc:root /run/rpcbind
			[ -f /run/rpcbind/portmap.xdr ] && chown _rpc:root /run/rpcbind/portmap.xdr
			[ -f /run/rpcbind/rpcbind.xdr ] && chown _rpc:root /run/rpcbind/rpcbind.xdr
		fi
	fi
fi

#DEBHELPER#