]> granicus.if.org Git - linux-pam/blob - conf/install_conf
Relevant BUGIDs: 530428
[linux-pam] / conf / install_conf
1 #!/bin/sh
2
3 CONFILE="$FAKEROOT"$CONFIGED/pam.conf
4 IGNORE_AGE=./.ignore_age
5 CONF=./pam.conf
6
7 echo
8
9 if [ -f "$IGNORE_AGE" ]; then
10         echo "you don't want to be bothered with the age of your $CONFILE file"
11         yes="n"
12 elif [ ! -f "$CONFILE" ] || [ "$CONF" -nt "$CONFILE" ]; then
13         if [ -f "$CONFILE" ]; then
14                 echo "\
15 An older Linux-PAM configuration file already exists ($CONFILE)"
16                 WRITE=overwrite
17         fi
18         echo -n "\
19 Do you wish to copy the $CONF file in this distribution
20 to $CONFILE ? (y/n) [n] "
21         read yes
22 else
23         yes=n
24 fi
25
26 if [ "$yes" = "y" ]; then
27         echo "  copying $CONF to $CONFILE"
28         cp $CONF $CONFILE
29 else
30         touch "$IGNORE_AGE"
31         echo "  Skipping $CONF installation"
32 fi
33
34 echo
35
36 exit 0