From de58ef9089a3d104e73e122b9c1c005544e5e0ef Mon Sep 17 00:00:00 2001 From: Mark Crane Date: Fri, 26 Dec 2008 08:35:23 +0000 Subject: Beginnings of a new TFTP package. --- packages/tftp/tftp.xml | 136 ++++++++++++++++++++++++++++++ packages/tftp/tftp_files.tmp | 173 ++++++++++++++++++++++++++++++++++++++ packages/tftp/tftp_inc.tmp | 193 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 502 insertions(+) create mode 100644 packages/tftp/tftp.xml create mode 100644 packages/tftp/tftp_files.tmp create mode 100644 packages/tftp/tftp_inc.tmp (limited to 'packages/tftp') diff --git a/packages/tftp/tftp.xml b/packages/tftp/tftp.xml new file mode 100644 index 00000000..eaf23d07 --- /dev/null +++ b/packages/tftp/tftp.xml @@ -0,0 +1,136 @@ + + + + + + + + FreeSWITCH is an open source telephony platform designed to facilitate the creation of voice and chat driven products scaling from a soft-phone up to a soft-switch. It can be used as a simple switching engine, a PBX, a media gateway or a media server to host IVR applications using simple scripts or XML to control the callflow. + Describe your package requirements here + Currently there are no FAQ items provided. + tftp Settings + 0.1 + TFTP: Settings + /usr/local/pkg/freeswitch.inc + + FreeSWITCH + Modify FreeSWITCH settings. +
Services
+ freeswitch.xml + /pkg_edit.php?xml=freeswitch.xml&id=0 +
+ + tftp + tftp.sh + tftp + Trivial File Transport Protocol is a very simple file transfer protocol. Often used with routers, voip phones and more. + + + + Description + /pkg_edit.php?xml=tftp.xml&id=0 + + + + Files + /tftp/tftp_files.php + + + installedpackages->package->$packagename->configuration->tftp + + /usr/local/pkg/ + 0755 + http://www.pfsense.com/packages/config/tftp/tftp_inc.tmp + + + /usr/local/pkg/ + 0755 + http://www.pfsense.com/packages/config/tftp/tftp_files.tmp + + + + Numbering Plan + numbering_plan + Enter the numbering plan here. example: US + input + + + Default Gateway + default_gateway + Enter the default gateway name here. example: asterlink.com + input + + + Default Area Code + default_area_code + Enter the area code here. example: 918 + input + + + SMTP Secure + smtpsecure + Select the SMTP security. None, TLS, SSL + select + + + + + + + + + + + sync_package(); + + + sync_package(); + + + php_install_command(); + + + php_deinstall_command(); + +
\ No newline at end of file diff --git a/packages/tftp/tftp_files.tmp b/packages/tftp/tftp_files.tmp new file mode 100644 index 00000000..a32d28f3 --- /dev/null +++ b/packages/tftp/tftp_files.tmp @@ -0,0 +1,173 @@ + + + + +

TFTP: Files

+ +
+ + +
+ +
+ + + + + +
+ +
+ + + + + +

IVR
+
+ Trivial File Transport Protocol is a very simple file transfer + protocol. Often used with routers, voip phones and more. +

+
+ + + + + + + + + \n"; + echo " \n"; + echo " \n"; + echo "\n"; + + } + } + closedir($handle); + } + ?> + + + + + + + + + + + + + + + +
NameDescription + + + + + +
+
\n"; + echo " $file"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo "
\n"; + echo "
+ + + + + +
+ a href="tftp_files_edit.php"> +
+
+ +
+ +
+
+
+
+
+
+ +
+ +
+ + + + + diff --git a/packages/tftp/tftp_inc.tmp b/packages/tftp/tftp_inc.tmp new file mode 100644 index 00000000..20327fd9 --- /dev/null +++ b/packages/tftp/tftp_inc.tmp @@ -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.php"); + 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 -- cgit v1.2.3