summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAntoine Ginies <aginies@mandriva.com>2005-08-29 07:50:49 +0000
committerAntoine Ginies <aginies@mandriva.com>2005-08-29 07:50:49 +0000
commite18c90f2a21345da5a2da409d495017d23632add (patch)
treed62a7cd4b1b0fae9c21c5c8f78da4fda61afb9c6
parent3468ba7d0cba8553749c19cdeb3c4835f438ec54 (diff)
downloaddrakwizard-e18c90f2a21345da5a2da409d495017d23632add.tar
drakwizard-e18c90f2a21345da5a2da409d495017d23632add.tar.gz
drakwizard-e18c90f2a21345da5a2da409d495017d23632add.tar.bz2
drakwizard-e18c90f2a21345da5a2da409d495017d23632add.tar.xz
drakwizard-e18c90f2a21345da5a2da409d495017d23632add.zip
various perl_checker fix
-rwxr-xr-xsamba_wizard/Sambaprint.pm48
1 files changed, 24 insertions, 24 deletions
diff --git a/samba_wizard/Sambaprint.pm b/samba_wizard/Sambaprint.pm
index 4c98d377..e86e18bd 100755
--- a/samba_wizard/Sambaprint.pm
+++ b/samba_wizard/Sambaprint.pm
@@ -54,7 +54,7 @@ use Data::Dumper;
print Dumper($samba);
my %cprint = (
- 1 => N('Printers - configure your printers'),
+ 1 => N("Printers - configure your printers"),
# 2 => N('Print - printers drivers'),
);
@@ -66,18 +66,18 @@ $o->{pages} = {
no_back => 1,
pre => sub {
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."));
+ $::in->ask_warn(N("Information"), N("It seems that you hadn't setup a Samba server. Please setup a Samba server with Samba wizard before manage your share."));
exit(1);
}
$o->{var}{wiz_do_printer_sharing} = "0";
},
data => [
# { label => "", val => \$o->{var}{wiz_todo}, list => [ keys %cprint ], format => sub { $cprint{$_[0]} } },
- { text => N('Enable printers in Samba?'), type => 'bool', val => \$o->{var}{wiz_do_printer_sharing} },
+ { text => N("Enable printers in Samba?"), type => 'bool', val => \$o->{var}{wiz_do_printer_sharing} },
],
post => sub {
if ($o->{var}{wiz_do_printer_sharing} == 0) {
- return 'summary_disable'
+ return 'summary_disable';
} else { return 'ask_printers' }
},
next => 'ask_printers',
@@ -89,23 +89,23 @@ $o->{pages} = {
$o->{var}{wiz_box_list} ||= [];
},
data => [
- { text => N('Enable all printers'), type => 'bool', val => \$o->{var}{wiz_all_printers} },
+ { text => N("Enable all printers"), type => 'bool', val => \$o->{var}{wiz_all_printers} },
{ val => \$o->{var}{wiz_box_list}, boolean_list => \$o->{var}{list_printers}, disabled => sub { $o->{var}{wiz_all_printers} and return 1; 0 } },
],
next => 'ask_printers_options',
},
ask_printers_options => {
- name => N('Now you can configure your printers service. Change value only if you know what your are doing.'),
+ name => N("Now you can configure your printers service. Change value only if you know what your are doing."),
pre => sub {
if ($samba->{printers}{comment}) {
- $o->{var}{wiz_printers_comment} ||= $samba->{printers}{comment}
+ $o->{var}{wiz_printers_comment} ||= $samba->{printers}{comment};
} else {
$o->{var}{wiz_printers_comment} = "All Printers";
}
$o->{var}{wiz_printers_browseable} ||= $samba->{printers}{browseable} or $o->{var}{wiz_printers_browseable} = "no";
$o->{var}{wiz_printers_guestok} ||= $samba->{printers}{'guest ok'} or $o->{var}{wiz_printers_guestok} = "yes";
if ($samba->{printers}{'create mode'}) {
- $o->{var}{wiz_printers_createmode} ||= $samba->{printers}{'create mode'}
+ $o->{var}{wiz_printers_createmode} ||= $samba->{printers}{'create mode'};
} else {
$o->{var}{wiz_printers_createmode} = "0700";
}
@@ -116,35 +116,35 @@ $o->{pages} = {
}
},
data => [
- { label => N('Comment:'), val => \$o->{var}{wiz_printers_comment} },
-# { label => N('Create mode:'), val => \$o->{var}{wiz_printers_createmode} },
- { label => N('Browseable:'), val => \$o->{var}{wiz_printers_browseable}, fixed_list => \@yesorno },
- { label => N('Guest ok:'), val => \$o->{var}{wiz_printers_guestok}, fixed_list => \@yesorno },
+ { label => N("Comment:"), val => \$o->{var}{wiz_printers_comment} },
+# { label => N("Create mode:"), val => \$o->{var}{wiz_printers_createmode} },
+ { label => N("Browseable:"), val => \$o->{var}{wiz_printers_browseable}, fixed_list => \@yesorno },
+ { label => N("Guest ok:"), val => \$o->{var}{wiz_printers_guestok}, fixed_list => \@yesorno },
],
next => 'summary',
},
summary => {
- name => N('Configuring Samba printers'),
+ name => N("Configuring Samba printers"),
pre => sub {
$o->{var}{wiz_sambatype} = $cprint{$o->{var}{wiz_type}};
},
data => [
- { label => N('Comment:'), fixed_val => \$o->{var}{wiz_printers_comment} },
- { label => N('Create mode:'), fixed_val => \$o->{var}{wiz_printers_createmode} },
- { label => N('Browseable:'), fixed_val => \$o->{var}{wiz_printers_browseable} },
- { label => N('Guest ok:'), fixed_val => \$o->{var}{wiz_printers_guestok} },
+ { label => N("Comment:"), fixed_val => \$o->{var}{wiz_printers_comment} },
+ { label => N("Create mode:"), fixed_val => \$o->{var}{wiz_printers_createmode} },
+ { label => N("Browseable:"), fixed_val => \$o->{var}{wiz_printers_browseable} },
+ { label => N("Guest ok:"), fixed_val => \$o->{var}{wiz_printers_guestok} },
],
post => \&do_it,
next => 'end',
},
summary_disable => {
- name => N('Disable Samba printers'),
+ name => N("Disable Samba printers"),
post => \&do_it,
next => 'end',
no_back => 1,
},
end => {
- name => N('Congratulations') . "\n\n" . N('The wizard successfully configured your Samba printer.'),
+ name => N("Congratulations") . "\n\n" . N("The wizard successfully configured your Samba printer."),
no_back => 1,
end => 1,
next => 0
@@ -167,7 +167,7 @@ sub new {
sub check() {
$> and return 1;
- $wiz->{net}->is_dhcp() and return 2;
+ $wiz->{net}->is_dhcp and return 2;
0;
}
@@ -201,7 +201,7 @@ sub list_printers() {
my ($printer) = split(':', $_);
} cat_("/etc/printcap");
if (@list) {
- @list
+ @list;
} else { () }
}
@@ -258,7 +258,7 @@ sub get_printers() {
my $string;
$o->{var}{wiz_all_printers} and return "all printers";
for (my $i; $i < @{$o->{var}{wiz_box_list}}; $i++) {
- $string .= "$o->{var}{list_printers}[$i]\n" if $o->{var}{wiz_box_list}[$i]
+ $string .= "$o->{var}{list_printers}[$i]\n" if $o->{var}{wiz_box_list}[$i];
}
$string;
}
@@ -270,7 +270,7 @@ sub get_printers() {
sub write_conf_restart_smb {
$samba->write_conf("/etc/samba/smb.conf");
if (services::is_service_running('smb')) {
- services::restart('smb')
+ services::restart('smb');
} else { services::start('smb') }
}
@@ -288,7 +288,7 @@ sub do_it {
printdollar_section();
} else {
if ($o->{var}{wiz_box_list}) {
- for(my $i; $i < @{$o->{var}{wiz_box_list}}; $i++) {
+ for (my $i; $i < @{$o->{var}{wiz_box_list}}; $i++) {
$o->{var}{list_printers}[$i] and remove_printer($o->{var}{list_printers}[$i]);
}
}