diff options
author | Arnaud Desmons <adesmons@mandriva.com> | 2002-10-02 15:06:44 +0000 |
---|---|---|
committer | Arnaud Desmons <adesmons@mandriva.com> | 2002-10-02 15:06:44 +0000 |
commit | 66aa02265bc6bd614f9561b87e1c93e585a7e14b (patch) | |
tree | 5429478465574b4e0a6e214edcd193215b65d077 | |
parent | 5721d35828d05dd29d02d385e2ad6ccef34666e6 (diff) | |
download | drakwizard-66aa02265bc6bd614f9561b87e1c93e585a7e14b.tar drakwizard-66aa02265bc6bd614f9561b87e1c93e585a7e14b.tar.gz drakwizard-66aa02265bc6bd614f9561b87e1c93e585a7e14b.tar.bz2 drakwizard-66aa02265bc6bd614f9561b87e1c93e585a7e14b.tar.xz drakwizard-66aa02265bc6bd614f9561b87e1c93e585a7e14b.zip |
commit wiz_dir also if file sharing is disabled, better explanations
-rwxr-xr-x | samba_wizard/scripts/Smbconf.pm | 12 |
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; |