summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xsamba_wizard/scripts/Smbconf.pm12
1 files changed, 4 insertions, 8 deletions
diff --git a/samba_wizard/scripts/Smbconf.pm b/samba_wizard/scripts/Smbconf.pm
index 3657f364..ddf09ee9 100755
--- a/samba_wizard/scripts/Smbconf.pm
+++ b/samba_wizard/scripts/Smbconf.pm
@@ -101,16 +101,14 @@ sub chg_var {
sub file_sharing {
my $self = shift;
- mkdir_p("/home/samba/public");
- standalone->explanations("Enabling samba /home/samba/public sharing");
-# comment_menu("homes", ";");
+ standalone->explanations("Enabling $ENV{wiz_dir} samba file sharing");
$self->comment_menu("public", "");
$self->chg_var("global", "security", "share");
}
sub homes {
my $self = shift;
- standalone->explanations("Enabling samba /home/samba/public sharing");
+ standalone->explanations("Enabling samba homes access");
$self->comment_menu("homes", "");
$self->chg_var("global", "security", "share");
}
@@ -155,14 +153,12 @@ 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");
- if ($ENV{wiz_do_file_sharing}) {
- $conf->file_sharing();
- $conf->chg_var("public", "path", $ENV{wiz_dir});
- }
+ $conf->file_sharing() if $ENV{wiz_do_file_sharing};
$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}) if $ENV{wiz_dir};
$conf->write_conf("/etc/samba/smb.conf");
system("/etc/rc.d/init.d/smb restart");
10;