File: install_conf

package info (click to toggle)
pam 1.3.1-5
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 13,084 kB
  • sloc: ansic: 31,022; xml: 21,835; sh: 12,645; makefile: 1,606; perl: 904; yacc: 408; lex: 72; sed: 16
file content (36 lines) | stat: -rwxr-xr-x 677 bytes parent folder | download | duplicates (11)
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
#!/bin/sh

CONFILE="$FAKEROOT"$CONFIGED/pam.conf
IGNORE_AGE=./.ignore_age
CONF=./pam.conf

echo

if [ -f "$IGNORE_AGE" ]; then
	echo "you don't want to be bothered with the age of your $CONFILE file"
	yes="n"
elif [ ! -f "$CONFILE" ] || [ "$CONF" -nt "$CONFILE" ]; then
	if [ -f "$CONFILE" ]; then
		echo "\
An older Linux-PAM configuration file already exists ($CONFILE)"
		WRITE=overwrite
	fi
	echo -n "\
Do you wish to copy the $CONF file in this distribution
to $CONFILE ? (y/n) [n] "
	read yes
else
	yes=n
fi

if [ "$yes" = "y" ]; then
	echo "  copying $CONF to $CONFILE"
	cp $CONF $CONFILE
else
	touch "$IGNORE_AGE"
	echo "  Skipping $CONF installation"
fi

echo

exit 0