aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2015-05-06 08:49:05 -0300
committerRenato Botelho <garga@FreeBSD.org>2015-05-06 08:49:05 -0300
commit42b8a8990fbe87532f15ea76463d8f2878ef5211 (patch)
tree117d6b4bc1c8d73cd7101b54af2638d83bc3fffa /config
parent7bf30eb704d309353cacd4b34bde6bb6bfee4cad (diff)
downloadpfsense-packages-42b8a8990fbe87532f15ea76463d8f2878ef5211.tar.gz
pfsense-packages-42b8a8990fbe87532f15ea76463d8f2878ef5211.tar.bz2
pfsense-packages-42b8a8990fbe87532f15ea76463d8f2878ef5211.zip
Replace some exec() calls by proper functions
Diffstat (limited to 'config')
-rwxr-xr-xconfig/squid3/34/squid.inc8
1 files changed, 5 insertions, 3 deletions
diff --git a/config/squid3/34/squid.inc b/config/squid3/34/squid.inc
index 63db45b8..4a1080ab 100755
--- a/config/squid3/34/squid.inc
+++ b/config/squid3/34/squid.inc
@@ -309,15 +309,17 @@ function squid_install_command() {
/* make sure pinger is executable */
if (file_exists(SQUID_LOCALBASE. "/libexec/squid/pinger"))
- exec("/bin/chmod a+x ". SQUID_LOCALBASE. "/libexec/squid/pinger");
+ @chmod(SQUID_LOCALBASE. "/libexec/squid/pinger", "a+x");
+ // XXX: Is it really necessary?
if (file_exists("/usr/local/etc/rc.d/squid"))
- exec("/bin/rm /usr/local/etc/rc.d/squid");
+ unlink_if_exists("/usr/local/etc/rc.d/squid");
squid_write_rcfile();
+ // XXX: Is it really necessary? mode is set to 0755 in squid.xml
if (file_exists("/usr/local/pkg/swapstate_check.php"))
- exec("/bin/chmod a+x /usr/local/pkg/swapstate_check.php");
+ @chmod("/usr/local/pkg/swapstate_check.php", "a+x");
write_rcfile(array(
"file" => "sqp_monitor.sh",