aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorThomas Schaefer <tom@tomschaefer.org>2011-10-02 19:24:17 -0400
committerThomas Schaefer <tom@tomschaefer.org>2011-10-02 19:24:17 -0400
commit8c27153be113df55f891c19594d0915c6362a665 (patch)
treeeebfea81a3e4c91b886c814f4ea774318d18c3d0 /config
parent965b82cb3b15d983da2bfce8db9303085d7122c9 (diff)
downloadpfsense-packages-8c27153be113df55f891c19594d0915c6362a665.tar.gz
pfsense-packages-8c27153be113df55f891c19594d0915c6362a665.tar.bz2
pfsense-packages-8c27153be113df55f891c19594d0915c6362a665.zip
Create user backup and install perl from absolute path in 8 stable
Diffstat (limited to 'config')
-rwxr-xr-xconfig/ipblocklist/8/ipblocklist.inc8
-rwxr-xr-xconfig/ipblocklist/8/ipblocklist.tmp3
2 files changed, 8 insertions, 3 deletions
diff --git a/config/ipblocklist/8/ipblocklist.inc b/config/ipblocklist/8/ipblocklist.inc
index d3d5e1cd..7a32da7a 100755
--- a/config/ipblocklist/8/ipblocklist.inc
+++ b/config/ipblocklist/8/ipblocklist.inc
@@ -55,9 +55,8 @@ function php_install_command_ip()
//install PERL
- exec("setenv PACKAGESITE \"ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8-stable/Latest/\"");
- exec("pkg_add -r perl");
- exec("pkg_add -r p5-Net-CIDR");
+ exec("pkg_add -r ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8-stable/All/perl-5.12-4_2.tbz");
+ exec("pkg_add -r ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8-stable/All/p5-Net-CIDR.tbz");
//exec("pkg_add -r compat7x-i386.tbz");
//exec("pkg_add -r compat6x-i386.tbz");
exec("rehash");
@@ -111,6 +110,9 @@ function php_install_command_ip()
exec("/usr/bin/touch /usr/local/www/packages/ipblocklist/OUTBOUND");
+ //Attempt to pull from a backup
+ exec("/bin/mkdir /usr/local/www/packages/ipblocklist_bkup");
+ exec("cp /usr/local/www/packages/ipblocklist_bkup/lists.txt /usr/local/www/packages/ipblocklist/lists.txt");
conf_mount_ro();
config_unlock();
diff --git a/config/ipblocklist/8/ipblocklist.tmp b/config/ipblocklist/8/ipblocklist.tmp
index 02f67c05..677158e2 100755
--- a/config/ipblocklist/8/ipblocklist.tmp
+++ b/config/ipblocklist/8/ipblocklist.tmp
@@ -56,6 +56,9 @@ if (count($_POST)>0) {
//Now clear ipfw, and process each list to ipfw commands
exec("/bin/sh convert-execute.sh");
+
+ //Attempt to create a backup of user lists
+ mwexec("cp /usr/local/www/packages/ipblocklist/lists.txt /usr/local/www/packages/ipbloclist_bkup/lists.txt");
}
else {