File: dh_installpam

package info (click to toggle)
debhelper 2.0.86
  • links: PTS
  • area: main
  • in suites: potato
  • size: 616 kB
  • ctags: 49
  • sloc: perl: 1,842; makefile: 251; sh: 5
file content (21 lines) | stat: -rwxr-xr-x 462 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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/share/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");
	}
}