summaryrefslogtreecommitdiffstats
path: root/installsrv_wizard
diff options
context:
space:
mode:
authorNicolas Vigier <nvigier@mandriva.com>2008-03-05 16:34:38 +0000
committerNicolas Vigier <nvigier@mandriva.com>2008-03-05 16:34:38 +0000
commit1ea920072c09c49c019188e7d30b7fca1e6e8391 (patch)
tree433600c92ac24c915f53e9bd981e19cbcc965c5f /installsrv_wizard
parentde522045836b90f9067ebbd04ee2895e3c5e7e11 (diff)
downloaddrakwizard-1ea920072c09c49c019188e7d30b7fca1e6e8391.tar
drakwizard-1ea920072c09c49c019188e7d30b7fca1e6e8391.tar.gz
drakwizard-1ea920072c09c49c019188e7d30b7fca1e6e8391.tar.bz2
drakwizard-1ea920072c09c49c019188e7d30b7fca1e6e8391.tar.xz
drakwizard-1ea920072c09c49c019188e7d30b7fca1e6e8391.zip
remove and don't install disabled wizards so that mcc doesn't offer to run them
Diffstat (limited to 'installsrv_wizard')
-rw-r--r--installsrv_wizard/.perl_checker1
-rw-r--r--installsrv_wizard/Installsrv.pm168
-rw-r--r--installsrv_wizard/Makefile10
3 files changed, 0 insertions, 179 deletions
diff --git a/installsrv_wizard/.perl_checker b/installsrv_wizard/.perl_checker
deleted file mode 100644
index 725f44b4..00000000
--- a/installsrv_wizard/.perl_checker
+++ /dev/null
@@ -1 +0,0 @@
-Basedir .. \ No newline at end of file
diff --git a/installsrv_wizard/Installsrv.pm b/installsrv_wizard/Installsrv.pm
deleted file mode 100644
index 3ea0dd7a..00000000
--- a/installsrv_wizard/Installsrv.pm
+++ /dev/null
@@ -1,168 +0,0 @@
-# version 0.2
-#
-# Copyright (C) 2004 Mandrakesoft
-#
-# Author: aginies _at_ mandrakesoft.com
-#
-# 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
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-#
-
-package MDK::Wizard::Installsrv;
-use lib qw(/usr/lib/libDrakX);
-#use ugtk2 qw(:ask :helpers :wrappers :create :dialogs);
-use strict;
-use standalone;
-use common;
-use services;
-use MDK::Wizard::Varspaceval;
-use MDK::Wizard::Wizcommon;
-use MDK::Wizard::Wizcommon_gtk2;
-
-
-# test root capa
-my $wiz = new MDK::Wizard::Wizcommon;
-
-my $INSTALLDIR = "/var/install/";
-my $NFSEXPORTS = "/etc/exports";
-my $WWWDIR = "/var/www/html";
-my $testy;
-
-my $o = {
- name => 'Install Server Wizard',
- var => {
- DESTDIR => '/var/install/clic',
- SOURCEDIR => '/home/nis/install/clic',
- },
- needed_rpm => [ 'nfs-utils', 'apache-mpm-prefork' ],
- defaultimage => "$ENV{__WIZ_HOME__}/installsrv_wizard/images/Install.png"
- };
-
-$o->{pages} = {
- welcome => {
- name => N("Configure an install server (via NFS and HTTP)") . "\n\n" . N("Easily configure a server installation directory, with NFS and HTTP access."),
- no_back => 1,
- next => 'install_srv',
- },
- install_srv => {
- name => N("Install server configuration") . "\n\n" . N("Path to data: specify your source directory, should be base of a Linux installation.") . "\n\n" . N("Destination directory: copy files in which directory?"),
- pre => sub {
- $o->{var}{wiz_nfs} ||= 1;
- $o->{var}{wiz_http} ||= 1;
- },
- data => [
- { label => "Path to data:", val => \$o->{var}{SOURCEDIR}, help => N("Please provide path to Mandriva installation disk") },
- { label => "Destination directory:", val => \$o->{var}{DESTDIR}, help => N("Files will be copied in this place.") },
-# { label => N("Enable NFS install server:"), type => 'bool', val => \$o->{var}{wiz_nfs} },
-# { label => N("Enable HTTP install server:"), type => 'bool', val => \$o->{var}{wiz_http} },
- ],
- post => \&test_data,
- next => 'summary_srv',
- },
- error_dir_dest => {
- name => N("The destination directory could not be '/var/install/'") . "\n\n" . N("ie use: /var/install/mdk-release"),
- next => 'install_srv',
- },
- error_dir => {
- name => N("Error, the source path must be a directory with full Linux installation directory."),
- next => 'install_srv',
- },
- dir_already_use => {
- name => N("The destination directory is already in use. Please choose another one."),
- next => 'install_srv',
- },
- summary_srv => {
- name => N("Your install server will be configured with these parameters"),
- pre => sub {
- $o->{var}{nfs} = $o->{var}{wiz_nfs} ? N("enabled") : N("disabled");
- $o->{var}{http} = $o->{var}{wiz_http} ? N("enabled") : N("disabled");
- },
- data => [
- { label => "Path to data:", val_ref => \$o->{var}{SOURCEDIR} },
- { label => "Destination directory:", val_ref => \$o->{var}{DESTDIR} },
- { label => N("Enable NFS install server:"), val_ref => \$o->{var}{nfs} },
- { label => N("Enable HTTP install server:"), val_ref => \$o->{var}{http} },
- ],
- post => \&do_it,
- no_back => 1,
- next => 'end',
- },
- wait => {
- name => N("Configuring your system, please wait..."),
- next => 'end',
- },
- error_end => {
- name => N("Failed"),
- data => [ { label => N("Please Relaunch drakwizard, and try to change some parameters.") } ],
- no_back => 1,
- end => 1,
- next => 0,
- },
- end => {
- name => N("Congratulations, Install server is now ready. You can now configure a DHCP server with PXE support, and a PXE server. So it will be very easy to install Linux through a network. Use drakpxelinux to configure your PXE server, and drakwizard DHCP to configure a DHCPD server."),
- end => 1,
- no_back => 1,
- next => 0
- },
- };
-
-
-sub add_install_dir {
- if (any { /$o->{var}{DESTDIR}/ } cat_($NFSEXPORTS)) {
- print " - " . $NFSEXPORTS . " ready\n";
- } else {
- append_to_file($NFSEXPORTS, "$o->{var}{DESTDIR} *(async,rw,no_root_squash)\n");
- check_started("nfs");
- system("service nfs reload");
- }
-}
-
-sub test_data {
- -d $o->{var}{SOURCEDIR} && -f "$o->{var}{SOURCEDIR}/VERSION" or return 'error_dir';
- if ($o->{var}{DESTDIR} eq $INSTALLDIR) { return 'error_dir_dest' }
- if (-e $o->{var}{DESTDIR}) { return 'dir_already_use' }
-}
-
-sub add_ftpuser {
- system("/usr/sbin/useradd -u 12383 -d install -r -s /bin/bash install");
-}
-
-sub add_http_link {
- my ($PATH) = @_;
- my $LINK = $WWWDIR . '/' . basename($PATH);
- if (! -f $LINK) {
- symlink $PATH, $LINK;
- }
- check_started("httpd");
-}
-
-sub do_it {
- return if $::testing;
- my $S = $o->{var}{SOURCEDIR};
- my $D = $o->{var}{DESTDIR};
- if (! -d $D) { mkdir_p($D) }
- my $command = "cp -av $S/* $D";
- MDK::Wizard::Wizcommon_gtk2::gtk_log($command, "Copying Data...");
-
- add_install_dir();
- add_http_link($o->{var}{DESTDIR});
- return 'end';
-}
-
-sub new {
- my ($class) = @_;
- bless $o, $class;
-}
-
-1;
diff --git a/installsrv_wizard/Makefile b/installsrv_wizard/Makefile
deleted file mode 100644
index 5a33958c..00000000
--- a/installsrv_wizard/Makefile
+++ /dev/null
@@ -1,10 +0,0 @@
-
-install2:
- su -c 'make install'
-
-install:
- mkdir -p --mode=u=rwx,g=rx,o=rx ${prefix}/share/wizards
- mkdir -p --mode=u=rwx,g=rx,o=rx ${prefix}/share/wizards/installsrv_wizard
- install --mode=u=rwx,g=rx,o=rx -p ftp.wiz ${prefix}/share/wizards/installsrv_wizard
- install --mode=a=r -p ./images/Install.png ${prefix}/share/wizards/installsrv_wizard/images
-