[ previous ] [ next ] [ threads ]
 
 From:  Paul Taylor <PaulTaylor at winn dash dixie dot com>
 To:  Olivier Cochard <cochard at gmail dot com>, m0n0wall-dev <m0n0wall dash dev at lists dot m0n0 dot ch>
 Subject:  RE: [m0n0wall-dev] Why some functions use /etc/ in the place of t he variable $g['etc_path'] in system.inc ?
 Date:  Thu, 20 Oct 2005 10:37:43 -0400
I'm guessing it's because Monowall was programmed by imperfect humans, not
perfect machines...  :)

Since it's in the system.inc, all the globals should have been loaded, so it
would be fine to use the appropriate globals for all those paths.

Paul


-----Original Message-----
From: Olivier Cochard [mailto:cochard at gmail dot com] 
Sent: Thursday, October 20, 2005 10:21 AM
To: m0n0wall-dev
Subject: [m0n0wall-dev] Why some functions use /etc/ in the place of the
variable $g['etc_path'] in system.inc ?

Hi all,
I'm try to learning FreeBSD and PHP by analysing the M0n0wall code.

And during the reading of the file "/etc/inc/system.inc" If found some
strange thing:

- The function system_timezone_configure() use this line:

exec("/usr/bin/tar xzfO /usr/share/zoneinfo.tgz " .
		escapeshellarg($timezone) . " > /etc/localtime");

- The Function system_reboot() use this line:

mwexec("nohup /etc/rc.reboot > /dev/null 2>&1 &");

Why this functions don't use the variable $g['etc_path'] in the place
of the fixed /etc/ ?

Regards

Olivier

---------------------------------------------------------------------
To unsubscribe, e-mail: m0n0wall dash dev dash unsubscribe at lists dot m0n0 dot ch
For additional commands, e-mail: m0n0wall dash dev dash help at lists dot m0n0 dot ch