#!/usr/bin/perl # # Guillaume Cottenceau # # Copyright 2001-2005 Mandriva # # 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 bootloader; use fs; my $auto; if ($ARGV[0] eq '--auto') { $auto = shift @ARGV; } $::prefix = '/mnt'; my $release = common::mageia_release($::prefix) || do { system('guessmounts') == 0 or die 'guessmounts failed'; common::mageia_release($::prefix); }; if ($release) { $release =~ /Mageia|Mandriva/ or die "release file doesn't contain '%s', exiting.\n"; } elsif (fs::get::mntpoint2part($::prefix, [ fs::read_fstab('', '/proc/mounts') ])) { die "unknown distribution mounted in $::prefix\n"; } else { die "Your root device isn't mounted on $::prefix\n"; } my @main_methods = bootloader::configured_main_methods(); my $main_method; if (@main_methods == 0) { die "Cannot find a configured boot loader\n"; } elsif (@main_methods == 1) { ($main_method) = @main_methods; } else { while (1) { print "Configuration files for Boot Loaders ", join(' and ', @main_methods), " were found.\n"; print "Which one one should be installed? "; chomp($main_method = ); if (member($main_method, @main_methods)) { last; } else { print "bad choice\n"; } } } my $install = $bootloader::{'install_raw_' . $main_method} or die "unknown bootloader method install_raw_$main_method\n"; print "About to re-install Boot Loader $main_method of following %s distribution:\n\t", $release, "\n"; if (!$auto) { print "=> ok? "; =~ /^n/i and exit 0; } run_program::run('mount', '--bind', '/dev', "$::prefix/dev"); $install->(); run_program::run('umount', "$::prefix/dev"); value='topic/KA9_0'>topic/KA9_0 Mageia Installer and base platform for many utilitiesThierry Vignaud [tv]
summaryrefslogtreecommitdiffstats
blob: 68684b99aefad061209ef0ef5c23769a0386c449 (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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
package mirror; # $Id: mirror.pm 269985 2010-06-09 22:02:57Z herton $

use diagnostics;
use strict;
use feature 'state';

use common;
use log;

my %land2tzs = (
	     N_("Australia") => [ 'Australia/Sydney' ],
	     N_("Austria") => [ 'Europe/Vienna', 'Europe/Brussels', 'Europe/Berlin' ],
	     N_("Belgium") => [ 'Europe/Brussels', 'Europe/Paris', 'Europe/Berlin' ],
	     N_("Brazil") => [ 'America/Sao_Paulo' ],
	     N_("Canada") => [ 'Canada/Atlantic', 'Canada/Eastern' ],
	     N_("Costa Rica") => [ 'America/Costa_Rica' ],
	     N_("Czech Republic") => [ 'Europe/Prague', 'Europe/Berlin' ],
	     N_("Denmark") => [ 'Europe/Copenhagen', 'Europe/Berlin' ],
	     N_("Estonia") => [ 'Europe/Tallinn', 'Europe/Helsinki' ],
	     N_("Finland") => [ 'Europe/Helsinki', 'Europe/Tallinn' ],
	     N_("France") => [ 'Europe/Paris', 'Europe/Brussels', 'Europe/Berlin' ],
	     N_("Germany") => [ 'Europe/Berlin', 'Europe/Prague' ],
	     N_("Greece") => [ 'Europe/Athens', 'Europe/Prague' ],
	     N_("Hungary") => [ 'Europe/Budapest' ],
	     N_("Ireland") => [ 'Europe/Dublin', 'Europe/London' ],
	     N_("Israel") => [ 'Asia/Tel_Aviv' ],
	     N_("Italy") => [ 'Europe/Rome', 'Europe/Brussels', 'Europe/Paris' ],
	     N_("Japan") => [ 'Asia/Tokyo', 'Asia/Seoul' ],