Sophie

Sophie

distrib > Fedora > 14 > x86_64 > by-pkgid > 38f65ea438a86e0d7c0fb045e4c010b1 > files > 41

initng-ifiles-0.1.5-4.fc12.x86_64.rpm

#!/sbin/itype
# This is a i file, used by initng parsed by install_service

# NAME: 
# DESCRIPTION: 
# WWW: 

daemon daemon/dhcpcd/* {
	need = system/bootmisc;
	use = system/modules system/coldplug;
	pid_file = /var/run/dhcpcd-${NAME}.pid;
	forks;
	respawn;
	daemon_stops_badly;
	env_file = /etc/conf.d/net;
	script daemon = {
		eval opts=\"\$\{dhcpcd_${NAME}\}\"
		eval d=\"\$\{dhcp_${NAME}\}\"
		[ "${d}" = "" ] && d="${dhcp}"

		for o in ${d}
		do
			case ${o} in
				nodns) opts="${opts} -R" ;;
				nontp) opts="${opts} -N" ;;
				nonis) opts="${opts} -Y" ;;
				nohostname) opts="${opts} -h" ;;
			esac
		done

		# Bad things happen if we get an infinite lease,
		# so try and make sure we don't
		echo "${opts}" | /bin/grep -w -- '-l' > /dev/null || opts="${opts} -l 86400"

		h=`hostname`
		if [ -n "${h}" -a ! "${h}" = "(none)" -a ! "${h}" = "localhost" ]
		then
			echo "${opts}" | /bin/grep -w -- '-h' || opts="${opts} -h ${h}"
		fi
		exec /sbin/dhcpcd ${opts} ${NAME}
	};
}