diff options
author | Renato Botelho <renato@netgate.com> | 2015-11-03 09:58:21 -0200 |
---|---|---|
committer | Renato Botelho <renato@netgate.com> | 2015-11-03 09:58:21 -0200 |
commit | 3ffd032b9ee65143496b6f77a1dbd4e0ee005edc (patch) | |
tree | 5bf7c788393b294b4f18eec7710052ac978e01a3 /config/tftp2/tftp.inc | |
parent | 7c7c37a066e02c39b9eb5c3c591d9b112e161f8d (diff) | |
parent | ccd5901adf9751219c9a0c86d16b1c45d661f8a9 (diff) | |
download | pfsense-packages-3ffd032b9ee65143496b6f77a1dbd4e0ee005edc.tar.gz pfsense-packages-3ffd032b9ee65143496b6f77a1dbd4e0ee005edc.tar.bz2 pfsense-packages-3ffd032b9ee65143496b6f77a1dbd4e0ee005edc.zip |
Merge pull request #1122 from doktornotor/patch-6
Diffstat (limited to 'config/tftp2/tftp.inc')
-rw-r--r-- | config/tftp2/tftp.inc | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/config/tftp2/tftp.inc b/config/tftp2/tftp.inc index 67054619..75ddaac8 100644 --- a/config/tftp2/tftp.inc +++ b/config/tftp2/tftp.inc @@ -50,10 +50,10 @@ function tftp_install_command() { // Restore backup if it exists if (file_exists($tftpbackup)) { - system("/usr/bin/tar xvpfz {$tftpbackup} -C /"); - system("/bin/chmod -R 0744 {$tftpdir}/*"); - unset($tftpbackup); + mwexec("/usr/bin/tar xvpfz {$tftpbackup} -C /"); + mwexec("/bin/chmod -R 0744 {$tftpdir}/*"); } + unset($tftpdir, $tftpbackup); } function tftp_deinstall_command() { @@ -68,11 +68,9 @@ function tftp_generate_rules($type) { return; } - // Open inetd.conf write handle + // Add tftpd daemon to inetd $inetd_fd = fopen("/var/etc/inetd.conf", "a+"); - // Add tftp daemon fwrite($inetd_fd, "tftp\t\tdgram\tudp\twait\t\troot\t/usr/libexec/tftpd\ttftpd /tftpboot\n"); - // Close file handle fclose($inetd_fd); if (!empty($config['installedpackages']['tftpd']['config'][0]['tftpdinterface'])) { |