head	1.3;
access;
symbols;
locks; strict;
comment	@# @;


1.3
date	96.08.09.05.30.30;	author morgan;	state Exp;
branches;
next	1.2;

1.2
date	96.03.10.21.02.23;	author morgan;	state Exp;
branches;
next	1.1;

1.1
date	96.03.09.08.53.38;	author morgan;	state Exp;
branches;
next	;


desc
@install script (bash) for replacing the system pam.conf file
@


1.3
log
@modified to take the destination of the config file from the top
level makefile
@
text
@#!/bin/bash

CONFILE=$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
@


1.2
log
@fixed logic and introduced ignore_age flag file
@
text
@d3 1
a5 1
CONFILE=/etc/pam.conf
@


1.1
log
@Initial revision
@
text
@d3 1
d9 9
a17 1
if [ -f $CONFILE ] || [ "$CONF" -nt "$CONFILE" ]; then
d19 2
a20 3
A Linux-PAM configuration file already exists ($CONFILE)
Do you wish to over-write it with the one contained in
this distribution? [n] "
d30 2
a31 1
	echo "  Skipping pam.conf installation"
@
