summaryrefslogtreecommitdiffstats
path: root/perl-install/install_steps_newt.pm
blob: 015de1c05e07549724eca8ce37cb5b648fd2f9d4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
package install_steps_newt;

use diagnostics;
use strict;
use vars qw(@ISA);

@ISA = qw(install_steps_interactive interactive_newt);

#-######################################################################################
#- misc imports
#-######################################################################################
use install_steps_interactive;
use interactive_newt;
use install_any;
use devices;
use common qw(:common);

my $banner = __();

sub banner {
    my $banner = translate(__("Linux-Mandrake Installation %s"));
    my $l = first(Newt::GetScreenSize) - length($banner) - length($_[0]) + 1;
    Newt::DrawRootText(0, 0, sprintf($banner, ' ' x $l . $_[0]));
}

sub new($$) {
    my ($type, $o) = @_;

    interactive_newt->new;

    banner('');
    Newt::PushHelpLine(_("  <Tab>/<Alt-Tab> between elements  | <Space> selects | <F12> next screen "));

    (bless {}, ref $type || $type)->SUPER::new($o);
}

sub doPartitionDisks($$) {
    my ($o, $hds, $raid) = @_;

    Newt::Suspend();
    foreach (@$hds) {
	print 
_("You can now partition your %s hard drive
When you are done, don't forget to save using `w'", $_->{device});
	print "\n\n";
	my $pid = fork or exec "fdisk", devices::make($_->{device});
	waitpid($pid, 0);
    }
    Newt::Resume();

    install_any::getHds($o);
    $o->ask_mntpoint_s($o->{fstab});
}

sub enteringStep {
    my ($o, $step) = @_;
    $o->SUPER::enteringStep($step);
    banner(translate($o->{steps}{$step}{text}));
}

sub exitInstall { 
    &install_steps_interactive::exitInstall;
    interactive_newt::end;
}


1;