head	1.2;
access;
symbols
	RELENG_4_11_0_RELEASE:1.1.1.1.6.1
	RELENG_4_11:1.1.1.1.6.1.0.16
	RELENG_4_11_BP:1.1.1.1.6.1
	RELENG_4_10_0_RELEASE:1.1.1.1.6.1
	RELENG_4_10:1.1.1.1.6.1.0.14
	RELENG_4_10_BP:1.1.1.1.6.1
	RELENG_4_9_0_RELEASE:1.1.1.1.6.1
	RELENG_4_9:1.1.1.1.6.1.0.12
	RELENG_4_9_BP:1.1.1.1.6.1
	RELENG_4_8_0_RELEASE:1.1.1.1.6.1
	RELENG_4_8:1.1.1.1.6.1.0.10
	RELENG_4_8_BP:1.1.1.1.6.1
	RELENG_4_7_0_RELEASE:1.1.1.1.6.1
	RELENG_4_7:1.1.1.1.6.1.0.8
	RELENG_4_7_BP:1.1.1.1.6.1
	RELENG_4_6_2_RELEASE:1.1.1.1.6.1
	RELENG_4_6_1_RELEASE:1.1.1.1.6.1
	RELENG_4_6_0_RELEASE:1.1.1.1.6.1
	RELENG_4_6:1.1.1.1.6.1.0.6
	RELENG_4_6_BP:1.1.1.1.6.1
	RELENG_4_5_0_RELEASE:1.1.1.1.6.1
	RELENG_4_5:1.1.1.1.6.1.0.4
	RELENG_4_5_BP:1.1.1.1.6.1
	RELENG_4_4_0_RELEASE:1.1.1.1.6.1
	RELENG_4_4:1.1.1.1.6.1.0.2
	RELENG_4_4_BP:1.1.1.1.6.1
	morgan_0_75:1.1.1.1
	RELENG_4_3_0_RELEASE:1.1.1.1
	RELENG_4_3:1.1.1.1.0.8
	RELENG_4_3_BP:1.1.1.1
	RELENG_4_2_0_RELEASE:1.1.1.1
	RELENG_4_1_1_RELEASE:1.1.1.1
	PRE_SMPNG:1.1.1.1
	RELENG_4_1_0_RELEASE:1.1.1.1
	RELENG_3_5_0_RELEASE:1.1.1.1
	RELENG_4_0_0_RELEASE:1.1.1.1
	RELENG_4:1.1.1.1.0.6
	RELENG_4_BP:1.1.1.1
	RELENG_3_4_0_RELEASE:1.1.1.1
	RELENG_3_3_0_RELEASE:1.1.1.1
	RELENG_3_2_PAO:1.1.1.1.0.4
	RELENG_3_2_PAO_BP:1.1.1.1
	RELENG_3_2_0_RELEASE:1.1.1.1
	RELENG_3_1_0_RELEASE:1.1.1.1
	RELENG_3:1.1.1.1.0.2
	RELENG_3_BP:1.1.1.1
	pam_unpruned:1.1.1.1
	morgan_0_65:1.1.1.1
	MORGAN:1.1.1;
locks; strict;
comment	@# @;


1.2
date	2002.03.08.13.03.44;	author des;	state dead;
branches;
next	1.1;

1.1
date	98.11.18.01.16.20;	author jdp;	state Exp;
branches
	1.1.1.1;
next	;

1.1.1.1
date	98.11.18.01.16.20;	author jdp;	state Exp;
branches
	1.1.1.1.6.1;
next	;

1.1.1.1.6.1
date	2001.06.11.15.28.16;	author markm;	state Exp;
branches;
next	1.1.1.1.6.2;

1.1.1.1.6.2
date	2012.11.17.07.22.20;	author svnexp;	state Exp;
branches;
next	;


desc
@@


1.2
log
@Say good-bye, Linux-PAM.
@
text
@#!/bin/bash

if [ `basename $PWD` != "modules" ]; then
	echo "$0 must be run from the .../modules directory"
	exit 1
fi

merge_line ()
{
	if [ $# != 3 ]; then
		echo "usage: merge_line token filename 'new line'"
	fi
	if [ -f $2 ]; then
# remove any existing entry...
		grep -v "$1" $2 > tmp.$2
		rm -f $2
		mv {tmp.,}$2
	fi
	cat << EOT >> $2
$3
EOT

}


if [ $# -ne 2 ]; then

	cat << EOT 2>&1
$0:	this script takes TWO arguments:
	the 'alphanumeric label' of the module and the location of
	its object file from the .../modules/ directory
EOT
	exit 1

else
	echo "
 *> registering static module: $1 ($2) <*
"
	merge_line "$1" _static_module_list "\
extern struct pam_module _$1_modstruct;"

	merge_line "$1" _static_module_entry "    &_$1_modstruct,"
	if [ -n "$2" ]; then
		merge_line "$2" _static_module_objects "../modules/$2"
	fi

fi

exit 0
@


1.1
log
@Initial revision
@
text
@@


1.1.1.1
log
@Initial import of virgin Linux-PAM 0.65, slightly stripped down.
@
text
@@


1.1.1.1.6.1
log
@Back out the extremely unwise PAM MFC that I did about 4 days ago.

My apologies to all. Please pass the pointy hat.
@
text
@a1 1
# $FreeBSD$
@


1.1.1.1.6.2
log
@Switch importer
@
text
@d2 1
a2 1
# $FreeBSD: stable/4/contrib/libpam/modules/register_static 78074 2001-06-11 15:28:52Z markm $
@


