Linino Locks up after ~12-24 hours Running php Script every minute

UPDATE: Looks like everything is working now!

I have changed dhcp.script on all my Yuns, but I am still not getting a proper route:

root@yun03:~# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.1.0     *               255.255.255.0   U     10     0        0 eth1
192.168.240.0   *               255.255.255.0   U     0      0        0 wlan0

Is there anything else I have to do other than edit dhcp.script and give the Yun a reboot? When does dhcp.script run? At startup or when a connection is initiated?

setup_interface () {
	proto_init_update "*" 1
	proto_add_ipv4_address "$ip" "${subnet:-255.255.255.0}"
	# TODO: apply $broadcast

	for i in $router; do
		proto_add_ipv4_route 0.0.0.0 0 "$i"
            route add -net 0.0.0.0/0 gw "$i"
	done

UPDATE: It looks like the problem was from not directly following instructions... I have a habit of using Notepad++ for editing files, but in this case it added an undesirable "^M" to the end of the line above the one added to dhcp.config.

Some final questions: The "/" in the line added looks out of place. Should it be a " " instead, or does it not matter?

Is dhcp.script not wiped and reloaded when "resetting to factory settings"? Because the Yun that I updated and had a "^M" did not have its ethernet connection fixed after a full reset.