diff options
author | Vasil Dimov <vd@FreeBSD.org> | 2006-12-12 15:29:36 +0000 |
---|---|---|
committer | Vasil Dimov <vd@FreeBSD.org> | 2006-12-12 15:29:36 +0000 |
commit | b4a2be37168bf09f15ebc5b0fec74ddfe68476de (patch) | |
tree | 0af2219aa17a79488ae16beadf7ad01f54c6372f /www/mod_v2h/files/add-module | |
parent | Remove expired leaf ports: (diff) |
Remove expired leaf ports:
2006-12-01 x11/XFree86-aoutlibs: Requires a.out ld.so and support libraries
2006-12-10 x11/linux-XFree86-libs: superseeded by linux-xorg-libs port
2006-12-04 www/mod_v2h: No longer available for download, the website is gone
2006-12-04 www/mod_injection: No longer available for download, the website is gone
Notes
Notes:
svn path=/head/; revision=179572
Diffstat (limited to 'www/mod_v2h/files/add-module')
-rw-r--r-- | www/mod_v2h/files/add-module | 61 |
1 files changed, 0 insertions, 61 deletions
diff --git a/www/mod_v2h/files/add-module b/www/mod_v2h/files/add-module deleted file mode 100644 index 9f4392eea16c..000000000000 --- a/www/mod_v2h/files/add-module +++ /dev/null @@ -1,61 +0,0 @@ -#!@@PERL@@ - -# This was stolen from the Apache apxs script -$CFG_SYSCONFDIR = "@@LOCAL@@/etc/apache2"; -$CFG_TARGET = "httpd"; -$name = "v2h"; -$dir = "libexec/apache2/"; -$t = "mod_v2h.so"; - -push(@lmd, sprintf("LoadModule %-18s %s", "${name}_module", "$dir$t")); - -open(FP, "<$CFG_SYSCONFDIR/$CFG_TARGET.conf") || die("Couldn't open conf file"); -my $content = join('', <FP>); -close(FP); - -if ($content !~ m|\n#?\s*LoadModule\s+|) { - error("Activation failed for custom $CFG_SYSCONFDIR/$CFG_TARGET.conf file."); - error("At least one `LoadModule' directive already has to exist."); - exit(1); -} - -my $lmd; -my $c = ''; - -foreach $lmd (@lmd) { - if ($content !~ m|\n#?\s*$lmd|) { - $content =~ s|^(.*\n#?\s*LoadModule\s+[^\n]+\n)|$1$c$lmd\n|sg; - } else { - $content =~ s|^(.*\n)#?\s*$lmd[^\n]*\n|$1$c$lmd\n|sg; - } - - $lmd =~ m|LoadModule\s+(.+?)_module.*|; - notice("[activating module `$1' in $CFG_SYSCONFDIR/$CFG_TARGET.conf]"); -} - -my $amd; - -foreach $amd (@amd) { - if ($content !~ m|\n#?\s*$amd|) { - $content =~ s|^(.*\n#?\s*AddModule\s+[^\n]+\n)|$1$c$amd\n|sg; - } else { - $content =~ s|^(.*\n)#?\s*$amd[^\n]*\n|$1$c$amd\n|sg; - } -} - -if (@lmd or @amd) { - if (open(FP, ">$CFG_SYSCONFDIR/$CFG_TARGET.conf.new")) { - print FP $content; - close(FP); - system("cp $CFG_SYSCONFDIR/$CFG_TARGET.conf.new $CFG_SYSCONFDIR/$CFG_TARGET.conf && " . "rm $CFG_SYSCONFDIR/$CFG_TARGET.conf.new"); -} else { - notice("unable to open configuration file"); -} - -} - -sub notice{ - print STDERR "$_[0]\n"; -} - - |