diff options
author | Mark Crane <mcrane@pfsense.org> | 2008-12-27 03:18:56 +0000 |
---|---|---|
committer | Mark Crane <mcrane@pfsense.org> | 2008-12-27 03:18:56 +0000 |
commit | 378fb592cd5e5870983f55f14585d91a9e838941 (patch) | |
tree | 15e1376a53a7ef3d8d59f1d7e031ab93ec16fba7 /packages/tftp/tftp.inc | |
parent | 975ceaa0bc10e81232128f94d514946f42bee36a (diff) | |
download | pfsense-packages-378fb592cd5e5870983f55f14585d91a9e838941.tar.gz pfsense-packages-378fb592cd5e5870983f55f14585d91a9e838941.tar.bz2 pfsense-packages-378fb592cd5e5870983f55f14585d91a9e838941.zip |
TFTP package fix restore
Diffstat (limited to 'packages/tftp/tftp.inc')
-rw-r--r-- | packages/tftp/tftp.inc | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/packages/tftp/tftp.inc b/packages/tftp/tftp.inc index 459ad8f5..26ec2be3 100644 --- a/packages/tftp/tftp.inc +++ b/packages/tftp/tftp.inc @@ -104,8 +104,8 @@ function php_install_command() // Create the directory exec("mkdir /tftpboot"); - //Set the directory permissions - exec("chmod -R 777 /tftpboot"); + //Set the directory permissions + exec("chmod -R 777 /tftpboot"); } @@ -114,10 +114,12 @@ function php_install_command() exec("mkdir /usr/local/www/tftp"); } - exec("tar zxvf /tmp/tftp.tgz -C /"); - unlink_if_exists("/tmp/tftp.tgz"); - system('cd /;tar cvzf /tmp/tftp.bak.tgz tftpboot'); - + //extract a specific directory to /tftpboot + if (file_exists('/tmp/'.$filename)) { + //echo "The file $filename exists"; + system('cd /; tar xvpfz /tmp/tftp.bak.tgz'); + unset($filename); + } //rename PHP files from .tmp to .php |