In setup1 you can replace
Code:
if [ -f /etc/redhat-release ] && [ ! -h /etc/redhat-release ]; then
version=`cat /etc/redhat-release | cut -f5 -d' '`
if [ -n '$version' ]; then
version=`cat /etc/redhat-release | cut -f3 -d' '`
fi
echo $version | grep \\. &> /dev/null
if [ $? != 0 ]; then
version=`echo $version.0`
fi
if [ "`cat /etc/redhat-release | cut -f1 -d' '`" == "CentOS" ]; then
distversion=`echo CentOS $version`
echo $distversion
distvers=centos${version//./}
else
distversion=`echo RedHat $version`
echo $distversion
distvers=rhat${version//./}
fi
echo dist=$distvers '##' > dist.info.tmp
grep -i $distvers dist.txt >> dist.info.tmp
cp -f dist.info.tmp dist.info
VAR1=`cat dist.info.tmp | cut -f1 -d=`
for var1 in $VAR1
do
echo export $var1 >> dist.info.ende
done
cat dist.info.ende >> dist.info.tmp
rm -f dist.info.ende
fi
with
Code:
if [ -f /etc/redhat-release ] && [ ! -h /etc/redhat-release ]; then
version=`cat /etc/redhat-release | cut -f7 -d' '`
echo $version | grep \\. &> /dev/null
if [ $? != 0 ]; then
version=`echo $version.0`
fi
distversion=`echo RHEL $version`
echo $distversion
distvers=rhel${version//./}
echo dist=$distvers '##' > dist.info.tmp
grep -i $distvers dist.txt >> dist.info.tmp
cp -f dist.info.tmp dist.info
VAR1=`cat dist.info.tmp | cut -f1 -d=`
for var1 in $VAR1
do
echo export $var1 >> dist.info.ende
done
cat dist.info.ende >> dist.info.tmp
rm -f dist.info.ende
fi
In dist.txt and the files in mod, copy the section for
centos42 and paste it at the end of each file, and replace
centos42 with
rhel40 in the pasted part. Unless CentOS 4.2 uses totally different settings/paths, this will work for RHEL 4.0.
Recent comments
1 day 4 hours ago
1 day 10 hours ago
1 day 14 hours ago
1 day 16 hours ago
2 days 54 min ago
2 days 10 hours ago
2 days 11 hours ago
2 days 14 hours ago
2 days 19 hours ago
2 days 19 hours ago