summaryrefslogtreecommitdiffstats
path: root/samba_wizard
diff options
context:
space:
mode:
authorFlorent Villard <warly@mandriva.com>2004-11-08 11:45:44 +0000
committerFlorent Villard <warly@mandriva.com>2004-11-08 11:45:44 +0000
commit3400c0ca81ac26cab55f79738f26ea1a7b7d12c9 (patch)
tree7f33db9593c39941a4ae8082612dacf610f8e7bf /samba_wizard
parent3d3734680e117b99440a597590a87cb2eb80f6bb (diff)
downloaddrakwizard-3400c0ca81ac26cab55f79738f26ea1a7b7d12c9.tar
drakwizard-3400c0ca81ac26cab55f79738f26ea1a7b7d12c9.tar.gz
drakwizard-3400c0ca81ac26cab55f79738f26ea1a7b7d12c9.tar.bz2
drakwizard-3400c0ca81ac26cab55f79738f26ea1a7b7d12c9.tar.xz
drakwizard-3400c0ca81ac26cab55f79738f26ea1a7b7d12c9.zip
Check if the printer list is empty. Allow to use the samba wizard from CVS
Diffstat (limited to 'samba_wizard')
-rwxr-xr-xsamba_wizard/Samba.pm8
1 files changed, 5 insertions, 3 deletions
diff --git a/samba_wizard/Samba.pm b/samba_wizard/Samba.pm
index 3e237da0..6e05cc0e 100755
--- a/samba_wizard/Samba.pm
+++ b/samba_wizard/Samba.pm
@@ -519,7 +519,7 @@ sub do_it {
$::testing and return;
my $in = 'interactive'->vnew('su', 'Samba');
my $w = $in->wait_message(N("Samba server"), N("Configuring your Samba server..."));
- my $file = "/usr/share/wizards//samba_wizard/scripts/smb.conf.default";
+ my $file = "$ENV{__WIZ_HOME__}samba_wizard/scripts/smb.conf.default";
my $conf = read_conf($file);
$conf->chg_var("global", "workgroup", $o->{var}{wiz_workgroup});
$conf->chg_var("global", "server string", $o->{var}{wiz_banner});
@@ -557,8 +557,10 @@ sub do_it {
$conf->printer_sharing;
} else {
standalone->explanations("Disabling printer sharing");
- for (my $i = 0; $i < @{$o->{var}{wiz_box_list}}; $i++) {
- $conf->comment_menu($o->{var}{list_printers}[$i], ";");
+ if (ref $o->{var}{wiz_box_list}) {
+ for (my $i = 0; $i < @{$o->{var}{wiz_box_list}}; $i++) {
+ $conf->comment_menu($o->{var}{list_printers}[$i], ";");
+ }
}
$conf->comment_menu("printers", ";");
}