File: postinst

package info (click to toggle)
xtel 3.1.4-4
  • links: PTS
  • area: main
  • in suites: hamm
  • size: 1,988 kB
  • ctags: 4,359
  • sloc: ansic: 14,674; makefile: 3,931; sh: 41
file content (33 lines) | stat: -rw-r--r-- 1,032 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
#!/bin/sh
# post install script for the Debian GNU/Linux xtel package

set -e

update-inetd --remove xtel
update-inetd --add \
"xtel            stream  tcp     nowait  root    /usr/sbin/xteld      xteld"

if fgrep '/usr/X11R6/lib/X11/fonts/xtel' /etc/X11/XF86Config > /dev/null ; then
	echo "XTel fonts are installed"
else
	echo "XTel can't work if there is not this line in /etc/X11/XF86Config:"
	echo "     FontPath	\"/usr/X11R6/lib/X11/fonts/xtel\""
 	echo -n "Do you want dpkg to modify /etc/X11/XF86Config now? (Y/n) "
	read
	if [ "$REPLY" = "n" -o "$REPLY" = "N" ] ; then
  		echo "/etc/X11/XF86Config will not be changed."
	else
		awk ' {
		if ($0~/Section \"Files\"/) {SECTION=1}
		if (SECTION && $0~/EndSection/) {
		SECTION=0
		print "     FontPath\t\"/usr/X11R6/lib/X11/fonts/xtel\"\n" }
		print $0 } ' /etc/X11/XF86Config > /etc/X11/XF86Config.xtel$$
		mv -f /etc/X11/XF86Config.xtel$$ /etc/X11/XF86Config
		echo "You must restart the X font server..."
	fi
fi

if [ -x /usr/bin/update-menus ]; then 
    update-menus
fi