aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrobiscool <robrob2626@yahoo.com>2009-12-20 12:29:02 -0800
committerrobiscool <robrob2626@yahoo.com>2009-12-20 12:29:02 -0800
commit0ea1d368d5590d4923b1a2a1bb2d6c26dfa0b17f (patch)
tree75b8801cb1694b3d1cb01fd6105c64ace01b9e3c
parentee65b76ebb2fc0ba3446381995aa6dadbb095edc (diff)
downloadpfsense-packages-0ea1d368d5590d4923b1a2a1bb2d6c26dfa0b17f.tar.gz
pfsense-packages-0ea1d368d5590d4923b1a2a1bb2d6c26dfa0b17f.tar.bz2
pfsense-packages-0ea1d368d5590d4923b1a2a1bb2d6c26dfa0b17f.zip
snort-dev, add paths, delete files, add xml code
-rw-r--r--config/snort-dev/snort.inc18
-rw-r--r--config/snort-dev/snort.xml26
-rw-r--r--config/snort-dev/snort_rename.pl100
3 files changed, 31 insertions, 113 deletions
diff --git a/config/snort-dev/snort.inc b/config/snort-dev/snort.inc
index bb4e201e..e50f5a28 100644
--- a/config/snort-dev/snort.inc
+++ b/config/snort-dev/snort.inc
@@ -139,6 +139,24 @@ function snort_postinstall()
exec('/bin/rm /usr/local/lib/snort/dynamicpreprocessor/lib_sfdynamic_preprocessor_example*');
}
+ /* move files around, make it look clean */
+ exec("/bin/mkdir -p /usr/local/www/snort/css");
+ exec("/bin/mkdir -p /usr/local/www/snort/images");
+ exec("/bin/mkdir -p /usr/local/www/snort/javascript");
+ exec("/bin/mv /usr/local/www/snort/style.css /usr/local/www/snort/css/style.css);
+ exec("/bin/mv /usr/local/www/snort/alert.jpg /usr/local/www/snort/images/alert.jpg);
+ exec("/bin/mv /usr/local/www/snort/down.gif /usr/local/www/snort/images/down.gif);
+ exec("/bin/mv /usr/local/www/snort/down2.gif /usr/local/www/snort/images/down2.gif);
+ exec("/bin/mv /usr/local/www/snort/icon-table-sort.png /usr/local/www/snort/images/icon-table-sort.png);
+ exec("/bin/mv /usr/local/www/snort/icon-table-sort-asc.png /usr/local/www/snort/images/icon-table-sort-asc.png);
+ exec("/bin/mv /usr/local/www/snort/icon-table-sort-desc.png /usr/local/www/snort/images/icon-table-sort-desc.png);
+ exec("/bin/mv /usr/local/www/snort/up.gif /usr/local/www/snort/images/up.gif);
+ exec("/bin/mv /usr/local/www/snort/up2.gif /usr/local/www/snort/images/up2.gif);
+ exec("/bin/mv /usr/local/www/snort/jquery.blockUI.js /usr/local/www/snort/javascript/jquery.blockUI.js);
+ exec("/bin/mv /usr/local/www/snort/jquery-1.3.2.js /usr/local/www/snort/javascript/jquery-1.3.2.js);
+ exec("/bin/mv /usr/local/www/snort/mootools.js /usr/local/www/snort/javascript/mootools.js);
+ exec("/bin/mv /usr/local/www/snort/sortableTable.js /usr/local/www/snort/javascript/sortableTable.js);
+
conf_mount_ro();
}
diff --git a/config/snort-dev/snort.xml b/config/snort-dev/snort.xml
index 22e9aacf..879cfe3e 100644
--- a/config/snort-dev/snort.xml
+++ b/config/snort-dev/snort.xml
@@ -104,67 +104,67 @@
<item>http://www.pfsense.com/packages/config/snort-dev/snort_whitelist.xml</item>
</additional_files_needed>
<additional_files_needed>
- <prefix>/usr/local/www/snort/images</prefix>
+ <prefix>/usr/local/www/snort/</prefix>
<chmod>077</chmod>
<item>http://www.pfsense.com/packages/config/snort-dev/images/alert.jpg</item>
</additional_files_needed>
<additional_files_needed>
- <prefix>/usr/local/www/snort/images</prefix>
+ <prefix>/usr/local/www/snort/</prefix>
<chmod>077</chmod>
<item>http://www.pfsense.com/packages/config/snort-dev/images/down.gif</item>
</additional_files_needed>
<additional_files_needed>
- <prefix>/usr/local/www/snort/images</prefix>
+ <prefix>/usr/local/www/snort/</prefix>
<chmod>077</chmod>
<item>http://www.pfsense.com/packages/config/snort-dev/images/down2.gif</item>
</additional_files_needed>
<additional_files_needed>
- <prefix>/usr/local/www/snort/images</prefix>
+ <prefix>/usr/local/www/snort/</prefix>
<chmod>077</chmod>
<item>http://www.pfsense.com/packages/config/snort-dev/images/icon-table-sort.png</item>
</additional_files_needed>
<additional_files_needed>
- <prefix>/usr/local/www/snort/images</prefix>
+ <prefix>/usr/local/www/snort/</prefix>
<chmod>077</chmod>
<item>http://www.pfsense.com/packages/config/snort-dev/images/icon-table-sort-asc.png</item>
</additional_files_needed>
<additional_files_needed>
- <prefix>/usr/local/www/snort/images</prefix>
+ <prefix>/usr/local/www/snort/</prefix>
<chmod>077</chmod>
<item>http://www.pfsense.com/packages/config/snort-dev/images/icon-table-sort-desc.png</item>
</additional_files_needed>
<additional_files_needed>
- <prefix>/usr/local/www/snort/images</prefix>
+ <prefix>/usr/local/www/snort/</prefix>
<chmod>077</chmod>
<item>http://www.pfsense.com/packages/config/snort-dev/images/up.gif</item>
</additional_files_needed>
<additional_files_needed>
- <prefix>/usr/local/www/snort/images</prefix>
+ <prefix>/usr/local/www/snort/</prefix>
<chmod>077</chmod>
<item>http://www.pfsense.com/packages/config/snort-dev/images/up2.gif</item>
</additional_files_needed>
<additional_files_needed>
- <prefix>/usr/local/www/snort/javascript/</prefix>
+ <prefix>/usr/local/www/snort/</prefix>
<chmod>077</chmod>
<item>http://www.pfsense.com/packages/config/snort-dev/javascript/jquery-1.3.2.js</item>
</additional_files_needed>
<additional_files_needed>
- <prefix>/usr/local/www/snort/javascript/</prefix>
+ <prefix>/usr/local/www/snort/</prefix>
<chmod>077</chmod>
<item>http://www.pfsense.com/packages/config/snort-dev/javascript/jquery.blockUI.js</item>
</additional_files_needed>
<additional_files_needed>
- <prefix>/usr/local/www/snort/javascript/</prefix>
+ <prefix>/usr/local/www/snort/</prefix>
<chmod>077</chmod>
<item>http://www.pfsense.com/packages/config/snort-dev/javascript/mootools.js</item>
</additional_files_needed>
<additional_files_needed>
- <prefix>/usr/local/www/snort/javascript/</prefix>
+ <prefix>/usr/local/www/snort/</prefix>
<chmod>077</chmod>
<item>http://www.pfsense.com/packages/config/snort-dev/javascript/sortableTable.js</item>
</additional_files_needed>
<additional_files_needed>
- <prefix>/usr/local/www/snort/css/</prefix>
+ <prefix>/usr/local/www/snort/</prefix>
<chmod>077</chmod>
<item>http://www.pfsense.com/packages/config/snort-dev/css/style.css</item>
</additional_files_needed>
diff --git a/config/snort-dev/snort_rename.pl b/config/snort-dev/snort_rename.pl
deleted file mode 100644
index e5f0d39e..00000000
--- a/config/snort-dev/snort_rename.pl
+++ /dev/null
@@ -1,100 +0,0 @@
-#!/usr/bin/perl -w
-
-#usage: rename perl_expression [files]
-my $usage = qq{rename [-v] s/pat/repl/ [filenames...]\t (c)2001 hellweg\@snark.de
-rename files read from the commandline or stdin
-
-License to use, modify and redistribute granted to each and every lifeform on
-this planet (as long as credit to hellweg\@snark.de remains). No guarantee that
-'rename' does or does not perform the way you want...
-
-} ;
-$verbose = 0 ;
-$quiet = 0 ;
-
-$op=shift || 0 ;
-if($op eq "-v") {
- $verbose++ ; $quiet = 0 ;
- $op=shift || 0 ;
-}
-if($op eq "-q") {
- $quiet++ ; $verbose = 0 ;
- $op=shift || 0 ;
-}
-if($op =~ /^-h/) {
- print $usage; exit(0) ;
-}
-
-if(! $op) {
- print $usage; exit(-1) ;
-}
-
-if (!@ARGV) {
- @ARGV = <STDIN>;
-}
-
-$count=0 ;
-my($m, $d, $y, $T) ;
-for (@ARGV) {
- chomp ;
- if(-e $_) {
- $was = $_;
- if($op =~ /\$[Tdym]/) {
- my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst)=localtime((stat($_))[9]);
- $m = sprintf("%0.2i", $mon+1);
- $d = sprintf("%0.2i", $mday);
- $y = $year + 1900 ;
- $T = "$y$m$d" ;
- }
- eval $op;
- die $@ if $@;
- if(-f $_) { print("! exists already: $was -> $_ \n") unless $quiet ; }
- else {
- if(rename($was, $_)) {
- print("$was -> $_\n") if $verbose ;
- $count++;
- } else {
- if(/\//) {
- # maybe we need to create dirs?
- my $createRes = createDirs($_) ;
- if($createRes) {
- print("! fauled to create $createRes for $_\n")
- unless $quiet ;
- }
- else { # try again
- if(rename($was, $_)) {
- print("$was -> $_\n") if $verbose ;
- $count++;
- } else {
- print("! failed to rename $was -> $_ \n")
- unless $quiet ;
- }
- }
- }
- else {
- print("! failed to rename $was -> $_ \n") unless $quiet ;
- }
- }
- }
- }
- else { print("! not found: $_ \n") ; }
-}
-print("renamed $count files\n") if $verbose ;
-
-
-sub createDirs { # return the dir we failed to create or 0
- my $file = shift ;
- my @dirs = split /\//, $file ;
- pop @dirs ; # don't try to mkdir the file itself
- my $current = "" ;
- $current = "/" if ($file =~ /^\//) ;
- foreach (@dirs) {
- $current .= $_ ;
- if(! -d $current) {
- mkdir $current, 0700 || return $current ;
- print "mkdir $current\n" if ($verbose) ;
- }
- $current .= "/" ;
- }
- return 0 ; # success
-}