[et-mgmt-tools] Cobbler, Cheetah and scripts in KS files

Aaron Lippold lippold at gmail.com
Fri Jun 8 12:22:20 UTC 2007


Hi All,

I am having issues with cobbler and importing a ks file of mine. All
is well with the simple parts of the %post section, but when I get to
a bit of scripting, the Cheetah parser complains at '" \/home "
${FSTAB} ' etc.

How can I escape this section or something?

Thanks,

Aaron

----- code below ----

# GEN002420

	FSTAB=/etc/fstab
	SED=/bin/sed
	# nosuid on /home
	if [ $(grep " \/home " ${FSTAB} | grep -c "nosuid") -eq 0 ]; then
	        MNT_OPTS=$(grep " \/home " ${FSTAB} | awk '{print $4}')
	        ${SED} -i "s/\( \/home.*${MNT_OPTS}\)/\1,nosuid/" ${FSTAB}
	fi

	# nosuid on /sys
	if [ $(grep " \/sys " ${FSTAB} | grep -c "nosuid") -eq 0 ]; then
	        MNT_OPTS=$(grep " \/sys " ${FSTAB} | awk '{print $4}')
	        ${SED} -i "s/\( \/sys.*${MNT_OPTS}\)/\1,nosuid/" ${FSTAB}
	fi

	# nosuid on /boot
	if [ $(grep " \/boot " ${FSTAB} | grep -c "nosuid") -eq 0 ]; then
	        MNT_OPTS=$(grep " \/boot " ${FSTAB} | awk '{print $4}')
	        ${SED} -i "s/\( \/boot.*${MNT_OPTS}\)/\1,nosuid/" ${FSTAB}
	fi

	# nodev on /usr
	if [ $(grep " \/usr " ${FSTAB} | grep -c "nodev") -eq 0 ]; then
	        MNT_OPTS=$(grep " \/usr " ${FSTAB} | awk '{print $4}')
	        ${SED} -i "s/\( \/usr.*${MNT_OPTS}\)/\1,nodev/" ${FSTAB}
	fi

	#nodev on /home
	if [ $(grep " \/home " ${FSTAB} | grep -c "nodev") -eq 0 ]; then
	        MNT_OPTS=$(grep " \/home " ${FSTAB} | awk '{print $4}')
	        ${SED} -i "s/\( \/home.*${MNT_OPTS}\)/\1,nodev/" ${FSTAB}
	fi

	# nodev on /usr
	if [ $(grep " \/usr " ${FSTAB} | grep -c "nodev") -eq 0 ]; then
	        MNT_OPTS=$(grep " \/usr " ${FSTAB} | awk '{print $4}')
	        ${SED} -i "s/\( \/usr.*${MNT_OPTS}\)/\1,nodev/" ${FSTAB}
	fi

	# nodev on /usr/local
	if [ $(grep " \/usr\/local " ${FSTAB} | grep -c "nodev") -eq 0 ]; then
	        MNT_OPTS=$(grep " \/usr\/local " ${FSTAB} | awk '{print $4}')
	        ${SED} -i "s/\( \/usr\/local.*${MNT_OPTS}\)/\1,nodev/" ${FSTAB}
	fi

	# nodev on /tmp
	if [ $(grep " \/tmp " ${FSTAB} | grep -c "nodev") -eq 0 ]; then
	        MNT_OPTS=$(grep " \/tmp " ${FSTAB} | awk '{print $4}')
	        ${SED} -i "s/\( \/tmp.*${MNT_OPTS}\)/\1,nodev/" ${FSTAB}
	fi

	# nodev on /var
	if [ $(grep " \/var " ${FSTAB} | grep -c "nodev") -eq 0 ]; then
	        MNT_OPTS=$(grep " \/var " ${FSTAB} | awk '{print $4}')
	        ${SED} -i "s/\( \/var.*${MNT_OPTS}\)/\1,nodev/" ${FSTAB}
	fi
# GEN003080




More information about the et-mgmt-tools mailing list