From 62e851bfbf9438d4e301cb8424809a89791b7691 Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Sun, 12 Sep 2004 13:42:57 +0000 Subject: [PATCH] Clifford Wolf: Don't run "sed -i" on stdin in Check-System this is to avoid creation of "-" files [2004090815404902977] (https://www.rocklinux.net/submaster) git-svn-id: http://www.rocklinux.org/svn/rock-linux/trunk@4214 c5f82cb5-29bc-0310-9cd0-bff59a50e3bc --- scripts/Check-System | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/Check-System b/scripts/Check-System index d9b3f2ced..c92a2e192 100755 --- a/scripts/Check-System +++ b/scripts/Check-System @@ -99,7 +99,8 @@ else rm -f "$x" fi -if [ -z "`type -p sed`" ] || ! sed -i s/a/b/ < /dev/null 2> /dev/null +tmpfile=`mktemp` +if [ -z "`type -p sed`" ] || ! sed -i s/a/b/ $tmpfile 2> /dev/null then echo echo "Paranoia Check: Program 'sed' not found or too old!" @@ -107,6 +108,7 @@ then echo "(GNU/sed since 2001-09-25). Install the latest sed version." found_error=1 fi +rm -f $tmpfile if [ $found_error -ne 0 ] ; then echo