summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnaud Desmons <adesmons@mandriva.com>2002-10-02 11:30:41 +0000
committerArnaud Desmons <adesmons@mandriva.com>2002-10-02 11:30:41 +0000
commit9e1db98fdcf1e6389c49f1897d445e006c440046 (patch)
tree73fde7439ed2ce788e24898ffb133ec4d66d3cbe
parentaae7a0a87b564db68fd6bb19fb987e5acfd665c7 (diff)
downloaddrakwizard-9e1db98fdcf1e6389c49f1897d445e006c440046.tar
drakwizard-9e1db98fdcf1e6389c49f1897d445e006c440046.tar.gz
drakwizard-9e1db98fdcf1e6389c49f1897d445e006c440046.tar.bz2
drakwizard-9e1db98fdcf1e6389c49f1897d445e006c440046.tar.xz
drakwizard-9e1db98fdcf1e6389c49f1897d445e006c440046.zip
test file sharing before changing path to avoid void values
-rwxr-xr-xsamba_wizard/scripts/Smbconf.pm6
1 files 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;