File: postinst

package info (click to toggle)
unclutter 8-9
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 152 kB
  • ctags: 55
  • sloc: ansic: 384; makefile: 86; sh: 52
file content (47 lines) | stat: -rw-r--r-- 957 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/bin/sh

set -e

. /usr/share/debconf/confmodule || exit 0

case "${1}" in
	configure)
		db_get unclutter/autostart
		START_UNCLUTTER="${RET}"

		if [ ! -e /etc/default/unclutter ]
		then

cat > /etc/default/unclutter << EOF
# /etc/default/unclutter - configuration file for unclutter

# Set this option to 'true' if you want to start unclutter
# automagically after X has been started for a user.
# Otherwise, set it to 'false'.
START_UNCLUTTER="${START_UNCLUTTER}"

# Options passed to unclutter, see 'man unclutter' for details.
EXTRA_OPTS="-idle 1 -root"
EOF

		else
			grep -Eq '^ *START_UNCLUTTER=' /etc/default/unclutter || \
				echo "START_UNCLUTTER=" >> /etc/default/unclutter

			sed -i -e "s|^ *START_UNCLUTTER=.*$|START_UNCLUTTER=${START_UNCLUTTER}|" /etc/default/unclutter
		fi
		;;

	abort-upgrade|abort-remove|abort-deconfigure)

		;;

	*)
		echo "postinst called with unknown argument \`${1}'" >&2
		exit 1
		;;
esac

#DEBHELPER#

exit 0