From 7778f6f5ff0f2489c5129fc504091fa5bb1b0fc0 Mon Sep 17 00:00:00 2001 From: Rene Rebe Date: Thu, 3 Jun 2004 23:29:13 +0000 Subject: [PATCH] Rene Rebe: * added a check for 'sed -i' to Check-System git-svn-id: http://www.rocklinux.org/svn/rock-linux/trunk@3156 c5f82cb5-29bc-0310-9cd0-bff59a50e3bc --- scripts/Check-System | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/scripts/Check-System b/scripts/Check-System index d9d84638e..9cb707e44 100755 --- a/scripts/Check-System +++ b/scripts/Check-System @@ -74,7 +74,7 @@ case $BASH_VERSION in echo "You need to update 'bash' to at least version 2.05b." found_error=1 esac - + x="`mktemp -p /tmp 2> /dev/null`" if [ -z "$x" -o ! -f "$x" ] ; then @@ -87,6 +87,15 @@ else rm -f "$x" fi +if [ -z "`type -p sed`" ] || ! sed -i s/a/b/ < /dev/null 2> /dev/null +then + echo + echo "Paranoia Check: Program 'sed' not found or too old!" + echo "You need a 'sed' installed which does know about the -i option" + echo "(GNU/sed since 2001-09-25). Install the latest sed version." + found_error=1 +fi + if [ $found_error -ne 0 ] ; then echo echo "Paranoia Check found errors -> not doing anything."