summaryrefslogtreecommitdiffstats
path: root/drakwizard.pl
diff options
context:
space:
mode:
authorFlorent Villard <warly@mandriva.com>2003-09-17 17:41:09 +0000
committerFlorent Villard <warly@mandriva.com>2003-09-17 17:41:09 +0000
commit986a271663c7f37797bec011b2ee9379e82ac4fe (patch)
treeadd300da8273c0c5dc56f0e13ac72066a80399d1 /drakwizard.pl
parentb5974747d1a6f7669052ddd42d4a45e4eb7072c1 (diff)
downloaddrakwizard-986a271663c7f37797bec011b2ee9379e82ac4fe.tar
drakwizard-986a271663c7f37797bec011b2ee9379e82ac4fe.tar.gz
drakwizard-986a271663c7f37797bec011b2ee9379e82ac4fe.tar.bz2
drakwizard-986a271663c7f37797bec011b2ee9379e82ac4fe.tar.xz
drakwizard-986a271663c7f37797bec011b2ee9379e82ac4fe.zip
better check of ip addresses in dhcp
check that server has been run in client dns check that the program is run as root in drakwizard remove bad quotes in po
Diffstat (limited to 'drakwizard.pl')
-rwxr-xr-xdrakwizard.pl17
1 files changed, 14 insertions, 3 deletions
diff --git a/drakwizard.pl b/drakwizard.pl
index 05c2e9c4..72740c0a 100755
--- a/drakwizard.pl
+++ b/drakwizard.pl
@@ -76,10 +76,21 @@ sub wizard {
my $page = $o->{pages}{welcome};
$::Wizard_title = $o->{name};
$::Wizard_pix_up = $o->{defaultimage};
+ check_rpm($o->{needed_rpm}) if $o->{needed_rpm};
+ if (defined $o->{init}) {
+ my ($res, $msg) = &{$o->{init}};
+ if (!$res) {
+ $in->ask_okcancel("error", $msg);
+ exit if ! $::testing
+ }
+ }
+ print "root $> allow_user $o->{allow_user} testing $::testing\n";
+ if ($> && !$o->{allow_user} && !$::testing) {
+ $in->ask_okcancel("error", N('You need to be root to run this wizard'));
+ exit;
+ }
my $next = 'welcome';
my @steps;
- check_rpm($o->{needed_rpm}) if $o->{needed_rpm};
- defined $o->{init} and &{$o->{init}};
while (1) {
undef $::Wizard_no_previous;
undef $::Wizard_no_cancel;
@@ -107,7 +118,7 @@ sub wizard {
}
my $a = $in->ask_from($o->{name}, $page->{name}, $data2);
if ($a) {
- push @steps, $next;
+ push @steps, $next if !$page->{ignore} && $steps[$#steps] ne $next;
$next = defined $page->{post} ? $page->{post}() : 0;
defined $o->{pages}{$next} or $next = $page->{next};
} else {