summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone/drakautoinst
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/standalone/drakautoinst')
-rwxr-xr-xperl-install/standalone/drakautoinst149
1 files changed, 0 insertions, 149 deletions
diff --git a/perl-install/standalone/drakautoinst b/perl-install/standalone/drakautoinst
deleted file mode 100755
index e811a2e31..000000000
--- a/perl-install/standalone/drakautoinst
+++ /dev/null
@@ -1,149 +0,0 @@
-#!/usr/bin/perl
-
-#
-# Guillaume Cottenceau (gc@mandrakesoft.com)
-#
-# Copyright 2001 MandrakeSoft
-#
-# This software may be freely redistributed under the terms of the GNU
-# public license.
-#
-# 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., 675 Mass Ave, Cambridge, MA 02139, USA.
-#
-
-use lib qw(/usr/lib/libDrakX);
-
-use common;
-use interactive;
-use standalone;
-use devices;
-use detect_devices;
-use steps;
-use commands;
-use fs;
-use Data::Dumper;
-
-$::isEmbedded = ($::XID, $::CCPID) = "@ARGV" =~ /--embedded (\w+) (\w+)/;
-
-
-local $_ = join '', @ARGV;
-
-/-h/ and die "usage: drakautoinst [--version]\n";
-/-version/ and die 'version: $Id$ '."\n";
-$::direct = /-direct/;
-
-
-my $in = 'interactive'->vnew('su', 'default');
-
-begin:
-$::isEmbedded and kill USR2, $::CCPID;
-
-$::direct or $in->ask_okcancel(_("Auto Install Configurator"),
-_("You are about to configure an Auto Install floppy. This feature is somewhat dangerous and must be used circumspectly.
-
-With that feature, you will be able to replay the installation you've performed on this computer, being interactively prompted for some steps, in order to change their values.
-
-For maximum safety, the partitioning and formatting will never be performed automatically, whatever you chose during the install of this computer.
-
-Do you want to continue?"), 1) or quit_global($in, 0);
-
-
-my @manual_steps = qw(doPartitionDisks formatPartitions);
-my @all_steps;
-my @choices;
-
-my $st = \%steps::installSteps;
-
-for (my $f = $st->{first}; $f; $f = $st->{$f}{next}) {
- next if member($f, @manual_steps);
- my $def_choice = 'replay';
- push @choices, { label => _($st->{$f}{text}), val => \$def_choice, list => [ 'replay', 'manual' ] };
- push @all_steps, [ $f, \$def_choice ];
-}
-
-$in->ask_from(_("Automatic Steps Configuration"),
- _("Please choose for each step whether it will replay like your install, or it will be manual"),
- \@choices
- ) or quit_global($in, 0);
-
-${$_->[1]} eq 'manual' and push @manual_steps, $_->[0] foreach @all_steps;
-
-
-my $imagefile = "/root/replay_install.img";
--f $imagefile or $in->ask_okcancel(_("Error!"),
- _("I can't find needed image file `%s'.", $imagefile), 1), quit_global($in, 0);
-my $mountdir = "/root/tmp/drakautoinst-mountdir"; -d $mountdir or mkdir $mountdir, 0755;
-my $floppy = detect_devices::floppy();
-my $dev = devices::make($floppy);
-$in->ask_okcancel('', _("Insert a blank floppy in drive %s", $floppy), 1) or quit_global($in, 0);
-{
- my $w = $in->wait_message('', _("Creating auto install floppy"));
- commands::dd("if=$imagefile", "of=$dev", "bs=1440", "count=1024");
- common::sync();
-}
-fs::mount($dev, $mountdir, 'vfat', 0);
-
-my $cfgfile = "$mountdir/auto_inst.cfg";
-eval(cat_($cfgfile));
-
-my $str = join('',
-"#!/usr/bin/perl -cw
-#
-# Special file generated by ``drakautoinst''.
-#
-# You should check the syntax of this file before using it in an auto-install.
-# You can do this with 'perl -cw auto_inst.cfg.pl' or by executing this file
-# (note the '#!/usr/bin/perl -cw' on the first line).
-",
- Data::Dumper->Dump([$o], ['$o']), q(
-package install_steps_auto_install;
-$graphical = 1;
-), Data::Dumper->Dump([\@manual_steps], ['$msteps']),
-q(push @graphical_steps, @$msteps;
-), "\0");
-$str =~ s/ {8}/\t/g; #- replace all 8 space char by only one tabulation, this reduces file size so much :-)
-output($cfgfile, $str);
-
-fs::umount($mountdir);
-
-
-$in->ask_okcancel(_("Congratulations!"),
-_("The floppy has been successfully generated.
-You may now replay your installation."));
-
-quit_global($in, 0);
-
-
-sub quit_global {
- my ($in, $exitcode) = @_;
- $::isEmbedded ? kill USR1, $::CCPID : $in->exit($exitcode);
- goto begin;
-}
-
-
-#-------------------------------------------------
-#- $Log$
-#- Revision 1.5 2001/08/29 21:58:24 gc
-#- quit_global
-#-
-#- Revision 1.4 2001/08/26 14:34:10 gc
-#- require -> use
-#-
-#- Revision 1.3 2001/08/18 17:52:21 prigaux
-#- big renaming of ask_from_entries_refH in ask_from and ask_from_entries_refH_powered in ask_from_
-#-
-#- Revision 1.2 2001/08/13 19:08:27 gc
-#- ouch! use lib from /usr/lib/libDrakX, rather than from ..
-#-
-#- Revision 1.1 2001/08/13 19:06:50 gc
-#- initial revision for drakautoinst
-#- - put %installSteps in a separate package (steps.pm) (for drakxtools)
-#- - use additional fields {auto} and {noauto}, by step, to ease interactive auto install and oem stuff
-#- - in install2.pm, perform each step either from the interactive class or from install_steps, according to the {auto} flag
-#- - id, tell each step to not try to be automatic if {noauto}
-#- - in the install, have auto install bootdisk created in install_any so we can always write a bootdisk (from install_steps) for further use from drakautoinst in standalone
-#- - interactive version of install_steps_auto_install is now inheriting from the interactive class, so we can click on a previous automatic step and have it interactively during an interactive auto install
-#-
-#-