From 9e1db98fdcf1e6389c49f1897d445e006c440046 Mon Sep 17 00:00:00 2001 From: Arnaud Desmons Date: Wed, 2 Oct 2002 11:30:41 +0000 Subject: test file sharing before changing path to avoid void values --- samba_wizard/scripts/Smbconf.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/samba_wizard/scripts/Smbconf.pm b/samba_wizard/scripts/Smbconf.pm index 63496ab7..3657f364 100755 --- a/samba_wizard/scripts/Smbconf.pm +++ b/samba_wizard/scripts/Smbconf.pm @@ -155,12 +155,14 @@ sub do_it { $conf->chg_var("global", "workgroup", $ENV{wiz_workgroup}); $conf->chg_var("global", "server string", $ENV{wiz_banner}); my $ip = $o->get_from_known_dev("IP"); - $conf->file_sharing() if $ENV{wiz_do_file_sharing}; + if ($ENV{wiz_do_file_sharing}) { + $conf->file_sharing(); + $conf->chg_var("public", "path", $ENV{wiz_dir}); + } $conf->printer_sharing() if $ENV{wiz_do_printer_sharing}; $conf->homes() if $ENV{wiz_do_homes}; $conf->chg_var("global", "hosts allow", $ip); $conf->chg_var("global", "security", "share"); - $conf->chg_var("public", "path", $ENV{wiz_dir}); $conf->write_conf("/etc/samba/smb.conf"); system("/etc/rc.d/init.d/smb restart"); 10; -- cgit v1.2.1