aboutsummaryrefslogtreecommitdiffstats
path: root/fix_pamd
diff options
context:
space:
mode:
authorGuillaume Rousse <guillomovitch@mandriva.org>2009-05-23 12:39:39 +0000
committerGuillaume Rousse <guillomovitch@mandriva.org>2009-05-23 12:39:39 +0000
commit47ffee16484c175cffc2b1cf445334be12ac5bd3 (patch)
tree4bfc32557a313a7889ae5f44ca455afd02c4c555 /fix_pamd
parent0af7318080a8601ed20a6ae2f7725a2be2d4f934 (diff)
downloadspec-helper-47ffee16484c175cffc2b1cf445334be12ac5bd3.tar
spec-helper-47ffee16484c175cffc2b1cf445334be12ac5bd3.tar.gz
spec-helper-47ffee16484c175cffc2b1cf445334be12ac5bd3.tar.bz2
spec-helper-47ffee16484c175cffc2b1cf445334be12ac5bd3.tar.xz
spec-helper-47ffee16484c175cffc2b1cf445334be12ac5bd3.zip
check buildroot as other scripts
Diffstat (limited to 'fix_pamd')
-rwxr-xr-xfix_pamd10
1 files changed, 10 insertions, 0 deletions
diff --git a/fix_pamd b/fix_pamd
index 895c44e..c87cb7d 100755
--- a/fix_pamd
+++ b/fix_pamd
@@ -1,5 +1,15 @@
#!/bin/sh
+if [ -z "$RPM_BUILD_ROOT" ]; then
+ echo "No build root defined" >&2
+ exit 1
+fi
+
+if [ ! -d "$RPM_BUILD_ROOT" ]; then
+ echo "Invalid build root" >&2
+ exit 1
+fi
+
configs=`find $RPM_BUILD_ROOT/etc/pam.d/ -type f ! -type l 2> /dev/null`
if [ -n "$configs" ]; then
echo -n "Fixing pam.d config files..."