summaryrefslogtreecommitdiff
path: root/inputmethod/ja-freewnn-lib/files/INSTALL
blob: 5b0b37e768648edb13ef7da7e65da0e87f91c095 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/sh

case $2 in
PRE-INSTALL)
	uid=`id -u ${WNNOWNER} 2> /dev/null`
	if [ X"$uid" != X ]; then
		exit 0
	fi

	wnn_uid=69
	uid=`id -u $wnn_uid 2> /dev/null`
	if [ X"$uid" != X ]; then
		wnn_uid=32768
		while id -u $wnn_uid > /dev/null 2>&1; do
			wnn_uid=`echo $wnn_uid+1|bc`
			if [ $wnn_uid = 65536 ]; then
				exit 1
			fi
		done
	fi
	chpass -l -a "${WNNOWNER}:*:$wnn_uid:1::0:0:User Wnn:/nonexistent:/sbin/nologin"
	exit $?
	;;
esac