summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAntoine Ginies <aginies@mandriva.com>2005-06-01 09:06:27 +0000
committerAntoine Ginies <aginies@mandriva.com>2005-06-01 09:06:27 +0000
commit66c174f92ee21a4688608819749a72cf0c5b0603 (patch)
treefd1621159b35f70a7c9af1ed4632446c1ce61804
parent50bf3c96e7972a2cb288ae5722dd8e6fcd1e6e61 (diff)
downloaddrakwizard-66c174f92ee21a4688608819749a72cf0c5b0603.tar
drakwizard-66c174f92ee21a4688608819749a72cf0c5b0603.tar.gz
drakwizard-66c174f92ee21a4688608819749a72cf0c5b0603.tar.bz2
drakwizard-66c174f92ee21a4688608819749a72cf0c5b0603.tar.xz
drakwizard-66c174f92ee21a4688608819749a72cf0c5b0603.zip
update
-rwxr-xr-xsamba_wizard/Sambaprint.pm27
1 files changed, 7 insertions, 20 deletions
diff --git a/samba_wizard/Sambaprint.pm b/samba_wizard/Sambaprint.pm
index 2e2cfa38..32170c67 100755
--- a/samba_wizard/Sambaprint.pm
+++ b/samba_wizard/Sambaprint.pm
@@ -65,28 +65,15 @@ $o->{pages} = {
name => N('Samba printers Wizard') . "\n\n" . N(''),
no_back => 1,
pre => sub {
- if (-f $wiz_samba_etc) {
- $::in->ask_warn(N("Information"), N("It seems you previously setup a Samba server. This wizard will re-read your old configuration, and show you the Samba server type you choose"));
- my $data = cat_($wiz_samba_etc);
- # detect old Samba type
- my ($old_type) = $data =~ /type=(\d)/;
- $o->{var}{wiz_type} = chomp_($old_type);
- } else { $o->{var}{wiz_type} = 2 }
+ if (! -f $wiz_samba_etc) {
+ $::in->ask_warn(N("Information"), N("It seems that you don\'t setup a Samba server. Please setup a Samba server with Samba wizard before manage your share."));
+ exit(1);
+ }
},
- next => 'ask_type',
- post => sub {
- if ($o->{var}{wiz_type} == 2) {
- return 'pdc' }
- elsif ($o->{var}{wiz_type} == 1) {
- return 'bdc' }
- elsif ($o->{var}{wiz_type} == 3) {
- return 'ask_workgroup' }
- elsif ($o->{var}{wiz_type} == 4) {
- return 'member' }
- },
- data => [
- { label => N("Wich type of Samba server do you you want:"), val => \$o->{var}{wiz_type}, list => [ keys %type ], format => sub { $type{$_[0]} } },
+ data => [
+ { label => N("? :"), val => \$o->{var}{wiz_todo}, list => [ keys %cprint ], format => sub { $cprint{$_[0]} } },
],
+ next => 'ask_services',
},
ask_printers => {
name => N('Select which printers you want to be accessible from known users'),