Index: m0n0dev.php
===================================================================
--- m0n0dev.php	(revision 17)
+++ m0n0dev.php	(working copy)
@@ -32,11 +32,11 @@
 */
  
 // Please set me to the path you checked out the m0n0wall FreeBSD 6 branch to.
 $dirs['mwroot'] = "/root/m0n0wall";	// no trailing slash please!
 
 // --[ package versions ]------------------------------------------------------
 
-$php_version			= "php-4.4.7";
+$php_version			= "php-5.2.10";
 $radius_version			= "radius-1.2.5";
 $mini_httpd_version		= "mini_httpd-1.19";
 $wol_version			= "wol-0.7.1";
@@ -44,9 +44,9 @@
 $bpalogin_version		= "bpalogin-2.0.2";
 $ucd_snmp_version		= "ucd-snmp-4.2.7";
 $mpd_version			= "mpd-3.18";
-$ipsec_tools_version 	= "ipsec-tools-0.7";
-$siproxd_version 	    = "siproxd-0.6.0";
-$ataidle_version        = "ataidle-2.3";
+$ipsec_tools_version 	= "ipsec-tools-0.7.2";
+$siproxd_version 	    = "siproxd-0.6.1";
+$ataidle_version        = "ataidle-2.4";
 
 // --[ image sizes ]-----------------------------------------------------------
 
@@ -56,7 +56,7 @@
 
 // --[ possible platforms and kernels ]----------------------------------------
 
 $platform_list	= "net45xx net48xx wrap generic-pc generic-pc-cdrom";//generic-pc-smp";
 $platforms		= explode(" ", $platform_list);
 
 
@@ -237,7 +238,7 @@
 
         if (!file_exists($dirs['packages'] ."/$php_version/ext/$radius_version.tgz")) {
             _exec("cd ". $dirs['packages'] ."/$php_version/ext; ".
-                  "fetch http://m0n0.ch/wall/downloads/freebsd-4.11/$radius_version.tgz");
+                  "fetch http://web.archive.org/web/20070808025727/m0n0.ch/wall/downloads/freebsd-4.11/$radius_version.tgz");
             _log("fetched $radius_version");
         }
         
@@ -290,7 +291,7 @@
 	
 	/* TODO: automate compile */
 	_prompt("After the screen appears, press TAB and then ENTER. (it's on the TODO list...)", 5);
-	_exec("cd /usr/ports/net/isc-dhcp3-server; make clean; make WITHOUT_DHCP_LDAP_SSL=YES WITHOUT_DHCP_PARANOIA=YES WITHOUT_DHCP_JAIL=YES");
+	_exec("cd /usr/ports/net/isc-dhcp31-server; make clean; make WITHOUT_DHCP_LDAP_SSL=YES WITHOUT_DHCP_PARANOIA=YES WITHOUT_DHCP_JAIL=YES");
 
 	_log("built dhcp server");
 }
@@ -299,7 +300,7 @@
 $h["build dhcprelay"] = "(re)builds the ISC DHCP relay";
 function build_dhcprelay() {
 	
-	_exec("cd /usr/ports/net/isc-dhcp3-relay; make clean; make");
+	_exec("cd /usr/ports/net/isc-dhcp31-relay; make clean; make");
 
 	_log("built dhcp relay");
 }
@@ -430,7 +431,7 @@
 	
 	// TODO: ugly...still need to better judge the port status
 	_exec("cd /usr/ports/net/mpd; make clean; make");
-	_exec("cd /usr/ports/net/mpd/work/$mpd_version; patch < ". $dirs['patches'] ."/packages/mpd.patch");
+	#_exec("cd /usr/ports/net/mpd/work/$mpd_version; patch < ". $dirs['patches'] ."/packages/mpd.patch");
 	_exec("cd /usr/ports/net/mpd/work/$mpd_version; make");
 	
 	_log("built and patched MPD");
@@ -499,7 +500,7 @@
 	if (!is_dir($dirs['packages'] ."/$siproxd_version")) {
         _exec("cd ". $dirs['packages'] ."; ".
               "tar zxf $siproxd_version.tar.gz; " .
-              "patch < ". $dirs['patches'] ."/user/siproxd.patch");
+              "echo patch ". $dirs['patches'] ."/user/siproxd.patch");
 		_log("untarred and patched $siproxd_version");
 	}
 	
@@ -676,7 +677,7 @@
 function populate_php($image_name) {
 	global $dirs, $php_version;
 	
-	_exec("cd ". $dirs['packages'] ."/$php_version/; install -s sapi/cgi/php $image_name/usr/local/bin");
+	_exec("cd ". $dirs['packages'] ."/$php_version/; install -s sapi/cli/php $image_name/usr/local/bin");
 	_exec("cp ". $dirs['files'] ."/php.ini $image_name/usr/local/lib/");
 
 	_log("added php");
@@ -710,7 +711,7 @@
 function populate_dhcpserver($image_name) {
 	global $dirs;
 	
-	_exec("cd /usr/ports/net/isc-dhcp3-server; ".
+	_exec("cd /usr/ports/net/isc-dhcp31-server; ".
 		"install -s work/dhcp-*/work.freebsd/server/dhcpd $image_name/usr/local/sbin");
 	
 	_log("added dhcp server");
@@ -721,7 +722,7 @@
 function populate_dhcprelay($image_name) {
 	global $dirs;
 	
-	_exec("cd /usr/ports/net/isc-dhcp3-relay; ".
+	_exec("cd /usr/ports/net/isc-dhcp31-relay; ".
 		"install -s work/dhcp-*/work.freebsd/relay/dhcrelay $image_name/usr/local/sbin");
 	
 	_log("added dhcp relay");
@@ -886,6 +887,7 @@
 }
 $h["populate ataidle"] = "adds ataidle to the given \"image_name\"";
 function populate_ataidle($image_name) {
+	global $ataidle_version;
 	
 	_exec("cd /usr/ports/sysutils/ataidle/work/$ataidle_version/; ".
 		"install -s ataidle $image_name/usr/local/sbin");
@@ -1119,7 +1121,9 @@
 
 function _get_dir_size($dir) {
 	exec("du -d 0 $dir", $out);
-	$out = preg_split("/\s+/", $out[0]);
+	# ori 
+	#$out = preg_split("/\s+/", $out[0]);
+	$out = split("\s+", $out[0]);
 	return $out[0];
 }
 
