File: preinst

package info (click to toggle)
xlockmore 4.09-3
  • links: PTS
  • area: main
  • in suites: hamm
  • size: 5,440 kB
  • ctags: 6,552
  • sloc: ansic: 54,180; sh: 1,624; makefile: 689; tcl: 439; java: 269; perl: 149
file content (32 lines) | stat: -rw-r--r-- 614 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
#!/bin/sh -e
# $Id: preinst,v 1.2 1998/03/28 01:37:05 herbert Exp $

pause() {
	echo -n "Press ENTER to continue..."
	read answer;
}

case "$1" in
install | upgrade | abort-upgrade)
	;;
*)
	echo "$0: incorrect arguments: $*" >&2
	exit 1
	;;
esac

if [ -x /usr/bin/ypmatch ]; then
	if /usr/bin/id | grep "^uid=0(" >/dev/null 2>&1; then
		PASSWD=`su nobody -c "ypmatch nobody passwd" | cut -d: -f2`
	else
		PASSWD=`ypmatch nobody passwd | cut -d: -f2`
	fi
	if [ "$PASSWD" = 'x' ]; then
		echo "xlockmore-gl has security problems with NIS."
		echo "Please try xlockmore for now."
		pause
		exit 1
	fi
fi

#DEBHELPER#