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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Index of Archives]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux