Blame SOURCES/nfsconvert.sh

bc9fd4
#!/bin/bash
bc9fd4
bc9fd4
#
bc9fd4
# Convert /etc/sysconfig/nfs values in /etc/nfs.conf valuse
bc9fd4
#
bc9fd4
bc9fd4
#
bc9fd4
# No file no conversion
bc9fd4
#
bc9fd4
if [ ! -f /etc/sysconfig/nfs ]; then
bc9fd4
	exit 0
bc9fd4
fi
bc9fd4
bc9fd4
# 
bc9fd4
# See if the conversion happen already
bc9fd4
#
bc9fd4
grep "nfs.conf" /etc/sysconfig/nfs > /dev/null
bc9fd4
if [ $? -eq 0 ]; then
bc9fd4
	exit 0
bc9fd4
fi
bc9fd4
bc9fd4
if [ -f /etc/nfs.conf.rpmnew ]; then
bc9fd4
	# See if it is the we want to use 
bc9fd4
	grep tag1234 /etc/nfs.conf.rpmnew > /dev/null
bc9fd4
	if [ $? -eq 0 ]; then
bc9fd4
		cp /etc/nfs.conf /etc/nfs.conf.rpmsave  
bc9fd4
		cat /etc/nfs.conf.rpmnew | sed '/tag123/d' > /etc/nfs.conf
bc9fd4
		rm /etc/nfs.conf.rpmnew
bc9fd4
	fi
bc9fd4
else
bc9fd4
		cp /etc/nfs.conf /etc/nfs.conf.rpmsave
bc9fd4
fi
bc9fd4
bc9fd4
#
bc9fd4
# Do the conversion 
bc9fd4
#
bc9fd4
/usr/sbin/nfsconvert
bc9fd4