From 3400c0ca81ac26cab55f79738f26ea1a7b7d12c9 Mon Sep 17 00:00:00 2001 From: Florent Villard Date: Mon, 8 Nov 2004 11:45:44 +0000 Subject: Check if the printer list is empty. Allow to use the samba wizard from CVS --- samba_wizard/Samba.pm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'samba_wizard') 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", ";"); } -- cgit v1.2.1