From 66aa02265bc6bd614f9561b87e1c93e585a7e14b Mon Sep 17 00:00:00 2001 From: Arnaud Desmons Date: Wed, 2 Oct 2002 15:06:44 +0000 Subject: commit wiz_dir also if file sharing is disabled, better explanations --- samba_wizard/scripts/Smbconf.pm | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'samba_wizard/scripts/Smbconf.pm') 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; -- cgit v1.2.1