diff options
author | Colin Smith <colin@pfsense.org> | 2005-03-21 04:41:08 +0000 |
---|---|---|
committer | Colin Smith <colin@pfsense.org> | 2005-03-21 04:41:08 +0000 |
commit | edd16b8cf9fd396c03b0add6632986a98eca03f7 (patch) | |
tree | 1ca54192008de4832b9c4d0da988fb50fd1956b2 /packages | |
parent | c34fb5342a439e59323e34185727f182e52801e2 (diff) | |
download | pfsense-packages-edd16b8cf9fd396c03b0add6632986a98eca03f7.tar.gz pfsense-packages-edd16b8cf9fd396c03b0add6632986a98eca03f7.tar.bz2 pfsense-packages-edd16b8cf9fd396c03b0add6632986a98eca03f7.zip |
Use chmod() instead of system() (or equivalent) for all package startup scripts.
Diffstat (limited to 'packages')
-rw-r--r-- | packages/assp.xml | 2 | ||||
-rw-r--r-- | packages/carp.xml | 4 | ||||
-rw-r--r-- | packages/doorman.xml | 2 | ||||
-rw-r--r-- | packages/freeradius.xml | 2 | ||||
-rw-r--r-- | packages/hula.xml | 2 | ||||
-rw-r--r-- | packages/ifstated.xml | 2 | ||||
-rw-r--r-- | packages/pure-ftpdsettings.xml | 2 | ||||
-rw-r--r-- | packages/spamd.xml | 4 | ||||
-rw-r--r-- | packages/stunnel.xml | 2 |
9 files changed, 11 insertions, 11 deletions
diff --git a/packages/assp.xml b/packages/assp.xml index 4e4cc14f..5d69218c 100644 --- a/packages/assp.xml +++ b/packages/assp.xml @@ -20,7 +20,7 @@ fwrite($fout, "# package management system\n\n"); fwrite($fout, "/usr/bin/perl /usr/local/assp/assp.pl &\n\n"); fclose($fout); - system("chmod 555 /usr/local/etc/rc.d/assp.sh"); + chmod("/usr/local/etc/rc.d/assp.sh", 0755); system("/usr/local/etc/rc.d/assp.sh &"); </custom_php_install_command> <custom_php_deinstall_command> diff --git a/packages/carp.xml b/packages/carp.xml index fb95aa3b..64eb9a2b 100644 --- a/packages/carp.xml +++ b/packages/carp.xml @@ -259,8 +259,8 @@ } fwrite($fout, "/etc/rc.filter_configure"); fclose($fout); - mwexec("chmod a+x /usr/local/etc/rc.d/carp.sh"); - system("/usr/local/etc/rc.d/carp.sh >/dev/null 2>&1 &"); + chmod("/usr/local/etc/rc.d/carp.sh", 0755); + mwexec("/usr/local/etc/rc.d/carp.sh"); if($using_arp_balance == 1) mwexec("sysctl net.inet.arpbalance=1"); if($preempt == 1) mwexec("sysctl net.inet.carp.preempt=1"); conf_mount_ro(); diff --git a/packages/doorman.xml b/packages/doorman.xml index 60b9b7c9..1d0662ba 100644 --- a/packages/doorman.xml +++ b/packages/doorman.xml @@ -68,7 +68,7 @@ $fout = fopen("/usr/local/etc/rc.d/doormand.sh","w"); fwrite($fout, "#!/bin/sh\n\n/usr/local/sbin/doormand -D &\n"); fclose($fout); - mwexec("chmod a+x /usr/local/etc/rc.d/doormand.sh"); + chmod("/usr/local/etc/rc.d/doormand.sh", 0755); </custom_php_install_command> <custom_php_command_before_form> function sync_package_doorman() { diff --git a/packages/freeradius.xml b/packages/freeradius.xml index c69c2371..ba425a95 100644 --- a/packages/freeradius.xml +++ b/packages/freeradius.xml @@ -103,7 +103,7 @@ $fout = fopen("/usr/local/etc/radiusd.conf.dynamic","w"); fwrite($fout, "{\nipaddr = 127.0.0.1\nport = 0\ntype = auth\n}\n\n"); fclose($fout); - mwexec("chmod a+x /usr/local/etc/rc.d/radiusd.sh"); + chmod("/usr/local/etc/rc.d/radiusd.sh", 0755); mwexec("/usr/local/etc/rc.d/radiusd.sh"); </custom_php_install_command> <custom_php_command_before_form> diff --git a/packages/hula.xml b/packages/hula.xml index b945e023..0b31bc53 100644 --- a/packages/hula.xml +++ b/packages/hula.xml @@ -57,6 +57,6 @@ fwrite($fout, "/sbin/mount -t linprocfs linprocfs /proc\n"); fwrite($fout, "/usr/local/hula/sbin/hulamanager &\n"); fclose($fout); - system("chmod 555 /usr/local/etc/rc.d/hula.sh &"); + chmod("/usr/local/etc/rc.d/hula.sh", 0755); </custom_php_install_command> </packagegui> diff --git a/packages/ifstated.xml b/packages/ifstated.xml index df60345c..c3f2367a 100644 --- a/packages/ifstated.xml +++ b/packages/ifstated.xml @@ -64,7 +64,7 @@ $fout = fopen("/usr/local/etc/rc.d/ifstated.sh","w"); fwrite($fout,"#!/bin/sh\n\n/usr/local/sbin/ifstated\n"); fclose($fout); - mwexec("chmod a+x /usr/local/etc/rc.d/radiusd.sh"); + chmod("/usr/local/etc/rc.d/radiusd.sh", 0755); </custom_php_install_command> <custom_add_php_command> conf_mount_rw(); diff --git a/packages/pure-ftpdsettings.xml b/packages/pure-ftpdsettings.xml index a58b0651..117004c6 100644 --- a/packages/pure-ftpdsettings.xml +++ b/packages/pure-ftpdsettings.xml @@ -106,7 +106,7 @@ fclose($fout); conf_mount_ro(); config_unlock(); - mwexec("chmod a+x /usr/local/etc/rc.d/pure-ftpd.sh"); + chmod("/usr/local/etc/rc.d/pure-ftpd.sh", 0755); mwexec("/usr/local/etc/rc.d/pure-ftpd.sh"); </custom_add_php_command> <custom_delete_php_command> diff --git a/packages/spamd.xml b/packages/spamd.xml index f34502e7..7fc2bf17 100644 --- a/packages/spamd.xml +++ b/packages/spamd.xml @@ -149,8 +149,8 @@ fwrite($fd, "/usr/local/sbin/spamd-setup &\n"); fwrite($fd, "/usr/local/libexec/spamlogd &\n"); fclose($fd); - system("chmod a+x /usr/local/etc/rc.d/spamd 2>/dev/null"); - system("/usr/local/etc/rc.d/spamd 2>/dev/null"); + chmod("/usr/local/etc/rc.d/spamd", 0755); + mwexec("/usr/local/etc/rc.d/spamd"); </custom_php_install_command> <custom_php_deinstall_command> unlink_if_exists("/usr/local/pkg/spamd*"); diff --git a/packages/stunnel.xml b/packages/stunnel.xml index 581c5971..0ce73997 100644 --- a/packages/stunnel.xml +++ b/packages/stunnel.xml @@ -80,7 +80,7 @@ system("mkdir -p /var/tmp/stunnel/var/tmp"); system("chmod a+rw /var/tmp/stunnel/var/tmp/."); system("mv /usr/local/etc/rc.d/stunnel.sh.sample /usr/local/etc/rc.d/stunnel.sh"); - system("chmod 555 /usr/local/etc/rc.d/stunnel.sh"); + chmod("/usr/local/etc/rc.d/stunnel.sh", 0555); </custom_php_install_command> <custom_php_deinstall_command> rmdir_recursive("/var/tmp/stunnel"); |