summaryrefslogtreecommitdiff
path: root/dh_installpam
diff options
context:
space:
mode:
authorjoey <joey>1999-08-17 05:12:07 +0000
committerjoey <joey>1999-08-17 05:12:07 +0000
commit430dd853a0827cf0419d2531cf163d4c1e19c4f9 (patch)
treeae457262f779a02c68718788b46c4c5bf7038626 /dh_installpam
parent540263202bcd5666ba65cd40e8587fdc9d48109a (diff)
downloaddebhelper-430dd853a0827cf0419d2531cf163d4c1e19c4f9.tar.gz
r189: Initial revision
Diffstat (limited to 'dh_installpam')
-rwxr-xr-xdh_installpam21
1 files changed, 21 insertions, 0 deletions
diff --git a/dh_installpam b/dh_installpam
new file mode 100755
index 00000000..2262d810
--- /dev/null
+++ b/dh_installpam
@@ -0,0 +1,21 @@
+#!/usr/bin/perl -w
+#
+# Integration with debian pam system:
+#
+# If debian/pam file exists, save it to $TMP/etc/pam.d/$PACKAGE
+
+BEGIN { push @INC, "debian", "/usr/lib/debhelper" }
+use Dh_Lib;
+init();
+
+foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
+ $TMP=tmpdir($PACKAGE);
+ $pam=pkgfile($PACKAGE,"pam");
+
+ if ($pam ne '') {
+ if (! -d "$TMP/etc/pam.d") {
+ doit("install","-d","$TMP/etc/pam.d");
+ }
+ doit("install","-p","-m644",$pam,"$TMP/etc/pam.d/$PACKAGE");
+ }
+}