From 306951e28791b261f894a8b71255b4c45d105661 Mon Sep 17 00:00:00 2001 From: Florent Villard Date: Mon, 20 Oct 2003 10:51:59 +0000 Subject: change copyright remove old xml related files --- web_wizard/Apache.pm | 6 +- web_wizard/apache2.wiz | 379 -------------------------------------- web_wizard/scripts/Apache2conf.pm | 120 ------------ web_wizard/scripts/Webconf.pm | 119 ------------ web_wizard/scripts/mytest.pl | 28 --- web_wizard/web.wiz | 379 -------------------------------------- 6 files changed, 4 insertions(+), 1027 deletions(-) delete mode 100644 web_wizard/apache2.wiz delete mode 100644 web_wizard/scripts/Apache2conf.pm delete mode 100644 web_wizard/scripts/Webconf.pm delete mode 100755 web_wizard/scripts/mytest.pl delete mode 100644 web_wizard/web.wiz (limited to 'web_wizard') diff --git a/web_wizard/Apache.pm b/web_wizard/Apache.pm index 5249446d..0d2fc4a2 100755 --- a/web_wizard/Apache.pm +++ b/web_wizard/Apache.pm @@ -2,8 +2,10 @@ # Drakwizard -# Copyright (C) 2002 Arnaud Desmons -# 2003 Florent Villard +# Copyright (C) 2002, 2003 Mandrakesoft +# +# Authors: Arnaud Desmons +# Florent Villard # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/web_wizard/apache2.wiz b/web_wizard/apache2.wiz deleted file mode 100644 index 51de8c9a..00000000 --- a/web_wizard/apache2.wiz +++ /dev/null @@ -1,379 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/web_wizard/scripts/Apache2conf.pm b/web_wizard/scripts/Apache2conf.pm deleted file mode 100644 index 94d284ce..00000000 --- a/web_wizard/scripts/Apache2conf.pm +++ /dev/null @@ -1,120 +0,0 @@ -#!/usr/bin/perl - -package Apache2conf; -require "__WIZ_HOME__/common/scripts/Varspaceval.pm"; -require "__WIZ_HOME__/common/scripts/IFCFG.pm"; -use MDK::Common; - -use strict; - -my $o = IFCFG->new(); - -sub check { - $> and return 1; - $o->is_dhcp() and return 2; - 0; -} - -a -my $file = "/etc/httpd/conf/httpd2.conf"; -my $root; - -if (-f $file) { - open(FH, "< $file") or die "$! ($file)"; - while () { - if (/^\s*\#?\s*DocumentRoot\s+(.*)/) { - close(FH); - $root = "$1"; - last; - } - } - close(FH); -} - -sub get_docroot { - $root; -} - -sub check_dir { - -d ($ENV{wiz_dir}) and return 10; - 1; -} - -sub chg_docroot { - my $old; - substInFile { - s|(^\s*\#?\s*DocumentRoot\s*)(\S*).*|$1$ENV{wiz_dir}| and $old ||=$2; - } "/etc/httpd/conf/httpd2.conf"; - - print "DEBUG $old"; - substInFile { - s|^\s*||; - } "/etc/httpd/conf/commonhttpd.conf" if $old; - - substInFile { - s|^\s*||; - } "/etc/httpd/conf/commonhttpd.conf"; -} - -sub is_user_mod { - if ($ENV{wiz_user_mod}) { - return 1; - } - $ENV{wiz_user_dir} = "disabled"; - 0; -} - -sub is_last_user_mod { - my $root = get_user_dir(); - chomp($root); - !($root eq 'disabled'); -} - -sub get_user_dir { - my %conf = Varspaceval->get("/etc/httpd/conf/commonhttpd.conf"); - $conf{UserDir}; -} - -sub chg_user_dir { - my $root = get_user_dir(); - if ($ENV{wiz_user_mod}) { - substInFile { - s|(/home/\*/)$root(/?)|$1$ENV{wiz_user_dir}$2|g; - } "/etc/httpd/conf/commonhttpd.conf"; - substInFile { - s|(\s*)UserDir\s*$root(/?)|$1UserDir $ENV{wiz_user_dir}$2|g; - s|(/home/\*/)$root(/?)|$1$ENV{wiz_user_dir}$2|g; - } "/etc/httpd/conf/commonhttpd.conf"; - } - else { - substInFile { - s|(\s*)UserDir\s*$root(/?)|$1UserDir disabled$2|g; - } "/etc/httpd/conf/commonhttpd.conf"; - } - 10; -} - -sub do_it { - my $file = "/etc/httpd/conf/commonhttpd.conf"; - my $that = "localhost"; - - if ($ENV{wiz_web_external} eq "1") { - $that = "all"; - } - elsif ($ENV{wiz_web_internal} eq "1") { - ($that) = $o->itf_get("IPADDR") =~ qr/^(\d{1,3}\.\d{1,3}\.\d{1,3}\.)\d{1,3}$/; - $that .= " 127.0.0.1"; - } - cp_af($file, $file.".orig"); - substInFile { - if( m /^\s*/s...m/^\s*<\/Directory>/s ) { - { s /^\s*Allow .*$/ Allow from $that\n/s;} - ;} - } $file; - chg_docroot(); - chg_user_dir(); - system("/etc/rc.d/init.d/httpd restart"); - 10; -} - -1; diff --git a/web_wizard/scripts/Webconf.pm b/web_wizard/scripts/Webconf.pm deleted file mode 100644 index a787ac37..00000000 --- a/web_wizard/scripts/Webconf.pm +++ /dev/null @@ -1,119 +0,0 @@ -#!/usr/bin/perl - -package Webconf; -require "__WIZ_HOME__/common/scripts/Varspaceval.pm"; -require "__WIZ_HOME__/common/scripts/IFCFG.pm"; -use MDK::Common; - -use strict; - -my $o = IFCFG->new(); - -sub check { - $> and return 1; - $o->is_dhcp() and return 2; - 0; -} - -my $file = "/etc/httpd/conf/httpd.conf"; -my $root; - -if (-f $file) { - open(FH, "< $file") or die "$! ($file)"; - while () { - if (/^\s*\#?\s*DocumentRoot\s+(.*)/) { - close(FH); - $root = "$1"; - last; - } - } - close(FH); -} - -sub get_docroot { - $root; -} - -sub check_dir { - -d ($ENV{wiz_dir}) and return 10; - 1; -} - -sub chg_docroot { - my $old; - substInFile { - s|(^\s*\#?\s*DocumentRoot\s*)(\S*).*|$1$ENV{wiz_dir}| and $old ||=$2; - } "/etc/httpd/conf/httpd.conf"; - - print "DEBUG $old"; - substInFile { - s|^\s*||; - } "/etc/httpd/conf/commonhttpd.conf" if $old; - - substInFile { - s|^\s*||; - } "/etc/httpd/conf/commonhttpd.conf"; -} - -sub is_user_mod { - if ($ENV{wiz_user_mod}) { - return 1; - } - $ENV{wiz_user_dir} = "disabled"; - 0; -} - -sub is_last_user_mod { - my $root = get_user_dir(); - chomp($root); - !($root eq 'disabled'); -} - -sub get_user_dir { - my %conf = Varspaceval->get("/etc/httpd/conf/commonhttpd.conf"); - $conf{UserDir}; -} - -sub chg_user_dir { - my $root = get_user_dir(); - if ($ENV{wiz_user_mod}) { - substInFile { - s|(/home/\*/)$root(/?)|$1$ENV{wiz_user_dir}$2|g; - } "/etc/httpd/conf/commonhttpd.conf"; - substInFile { - s|(\s*)UserDir\s*$root(/?)|$1UserDir $ENV{wiz_user_dir}$2|g; - s|(/home/\*/)$root(/?)|$1$ENV{wiz_user_dir}$2|g; - } "/etc/httpd/conf/commonhttpd.conf"; - } - else { - substInFile { - s|(\s*)UserDir\s*$root(/?)|$1UserDir disabled$2|g; - } "/etc/httpd/conf/commonhttpd.conf"; - } - 10; -} - -sub do_it { - my $file = "/etc/httpd/conf/commonhttpd.conf"; - my $that = "localhost"; - - if ($ENV{wiz_web_external} eq "1") { - $that = "all"; - } - elsif ($ENV{wiz_web_internal} eq "1") { - ($that) = $o->itf_get("IPADDR") =~ qr/^(\d{1,3}\.\d{1,3}\.\d{1,3}\.)\d{1,3}$/; - $that .= " 127.0.0.1"; - } - cp_af($file, $file.".orig"); - substInFile { - if( m /^\s*/s...m/^\s*<\/Directory>/s ) { - { s /^\s*Allow .*$/ Allow from $that\n/s;} - ;} - } $file; - chg_docroot(); - chg_user_dir(); - system("/etc/rc.d/init.d/httpd restart"); - 10; -} - -1; diff --git a/web_wizard/scripts/mytest.pl b/web_wizard/scripts/mytest.pl deleted file mode 100755 index e13f3708..00000000 --- a/web_wizard/scripts/mytest.pl +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/perl -use strict; - -open(FH, $ARGV[0]); - -my $that; - -if ($ENV{wiz_web_external} eq "1") { - $that = "all"; -} -elsif ($ENV{wiz_web_internal} eq "1") { - $that = $ip; -} -else { - $that = "localhost"; -} - - -while() { - if( m/^[[:space:]]*/s ) { - s/^[[:space:]]*Allow .*$/Allow from $that/s; - } - if( m /^[[:space:]]*/s ) { - s/^[[:space:]]*Allow .*$/Allow from $that/s; - } - print $_; -} - diff --git a/web_wizard/web.wiz b/web_wizard/web.wiz deleted file mode 100644 index bb7ec2c3..00000000 --- a/web_wizard/web.wiz +++ /dev/null @@ -1,379 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- cgit v1.2.1