From 47ffee16484c175cffc2b1cf445334be12ac5bd3 Mon Sep 17 00:00:00 2001 From: Guillaume Rousse Date: Sat, 23 May 2009 12:39:39 +0000 Subject: check buildroot as other scripts --- fix_pamd | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'fix_pamd') 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..." -- cgit v1.2.1