From a05b6047746940a720388a88576017e21e7e829d Mon Sep 17 00:00:00 2001 From: Mark Crane Date: Fri, 26 Dec 2008 18:01:11 +0000 Subject: tftp package tftp installation take2 --- packages/tftp/tftp.inc | 193 +++++++++++++++++++++++++++++++++++++++++++ packages/tftp/tftp.xml | 6 +- packages/tftp/tftp_files.tmp | 2 +- pkg_config.7.xml | 2 +- 4 files changed, 198 insertions(+), 5 deletions(-) create mode 100644 packages/tftp/tftp.inc diff --git a/packages/tftp/tftp.inc b/packages/tftp/tftp.inc new file mode 100644 index 00000000..ee34c68c --- /dev/null +++ b/packages/tftp/tftp.inc @@ -0,0 +1,193 @@ + "tftp.sh", + "start" => "/usr/sbin/inetd", + "stop" => "killall -9 /usr/sbin/inetd" + ) + ); + + + //sync_package_freeswitch(); + $handle = popen("/usr/sbin/inetd", "r"); + pclose($handle); + + //if (pkg_is_service_running('freeswitch')) { + // sync_package_freeswitch_ivr(); + //} + + //conf_mount_ro(); + //config_unlock(); + +} + + +function php_deinstall_command() +{ + + //prepare inetd.conf for tftp + $filename = "/etc/inetd.conf"; + $handle = fopen($filename,"rb"); + $contents = fread($handle, filesize($filename)); + fclose($handle); + + $handle = fopen($filename,"w"); + $contents = str_replace("tftp dgram udp wait root /usr/libexec/tftpd", "#tftp dgram udp wait root /usr/libexec/tftpd", $contents); + fwrite($handle, $contents); + unset($contents); + fclose($fout); + unset($filename); + + exec("killall -9 /usr/sbin/inetd"); + + unlink_if_exists("/usr/local/pkg/tftp.xml"); + unlink_if_exists("/usr/local/pkg/tftp.inc"); + unlink_if_exists("/usr/local/www/tftp/tftp_files.php"); + + exec("rm -R /tftpboot"); + unlink_if_exists("/usr/local/etc/rc.d/tftp.sh"); + unlink_if_exists("/tmp/pkg_mgr_tftp.log"); + +} + +?> \ No newline at end of file diff --git a/packages/tftp/tftp.xml b/packages/tftp/tftp.xml index 3cc9c305..48d273f0 100644 --- a/packages/tftp/tftp.xml +++ b/packages/tftp/tftp.xml @@ -41,9 +41,9 @@ Describe your package requirements here Currently there are no FAQ items provided. tftp Settings - 0.2 + 0.3 TFTP: Settings - /usr/local/pkg/tftp_inc.php + /usr/local/pkg/tftp.inc TFTP Add or Remove files for TFTP. @@ -72,7 +72,7 @@ /usr/local/pkg/ 0755 - http://www.pfsense.com/packages/config/tftp/tftp_inc.tmp + http://www.pfsense.com/packages/config/tftp/tftp.inc /usr/local/pkg/ diff --git a/packages/tftp/tftp_files.tmp b/packages/tftp/tftp_files.tmp index a32d28f3..65df5424 100644 --- a/packages/tftp/tftp_files.tmp +++ b/packages/tftp/tftp_files.tmp @@ -31,7 +31,7 @@ */ require("guiconfig.inc"); -require("/usr/local/pkg/tftp_inc.php"); +require("/usr/local/pkg/tftp.inc"); //$a_ivr = &$config['installedpackages']['freeswitchivr']['config']; diff --git a/pkg_config.7.xml b/pkg_config.7.xml index 0362676a..8749619a 100644 --- a/pkg_config.7.xml +++ b/pkg_config.7.xml @@ -80,7 +80,7 @@ http://www.pfsense.com/packages/config/tftp/tftp.xml http://files.pfsense.org/packages/7/All/ - 0.2 + 0.3 Alpha 1.2.1 markjcrane@gmail.com -- cgit v1.2.3