aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xfix_pamd10
-rwxr-xr-xgprintify11
-rwxr-xr-xremove_info_dir12
3 files changed, 30 insertions, 3 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..."
diff --git a/gprintify b/gprintify
index 34ca30d..f78bbbd 100755
--- a/gprintify
+++ b/gprintify
@@ -1,7 +1,16 @@
#!/bin/sh
-
# $Id$
+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
+
if test -z "$DONT_GPRINTIFY"; then
scripts=
for f in `ls $RPM_BUILD_ROOT/etc/rc.d/init.d/* $RPM_BUILD_ROOT/etc/init.d/* 2> /dev/null`; do
diff --git a/remove_info_dir b/remove_info_dir
index aa1e152..a79cd4a 100755
--- a/remove_info_dir
+++ b/remove_info_dir
@@ -1,8 +1,16 @@
#!/bin/sh
-INFODIR=`rpm --eval %{_infodir}/dir`
+if [ -z "$RPM_BUILD_ROOT" ]; then
+ echo "No build root defined" >&2
+ exit 1
+fi
-test -n "$RPM_BUILD_ROOT" || exit 0
+if [ ! -d "$RPM_BUILD_ROOT" ]; then
+ echo "Invalid build root" >&2
+ exit 1
+fi
+
+INFODIR=`rpm --eval %{_infodir}/dir`
dir="$RPM_BUILD_ROOT/$INFODIR"