diff options
Diffstat (limited to 'samba_wizard')
-rwxr-xr-x | samba_wizard/scripts/Smbconf.pm | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/samba_wizard/scripts/Smbconf.pm b/samba_wizard/scripts/Smbconf.pm index 78c0bb65..dd3df24e 100755 --- a/samba_wizard/scripts/Smbconf.pm +++ b/samba_wizard/scripts/Smbconf.pm @@ -21,9 +21,15 @@ sub check { sub check_services { $ENV{wiz_do_homes} and return 2; + $ENV{wiz_do_file_sharing} and return 1; 0; } +sub check_dir { + -d ($ENV{wiz_dir}) and return 10; + 1; +} + sub read_conf { my $self = {}; my ($file) = @_; @@ -135,6 +141,13 @@ sub get_banner { $old->{conf}->{global}{"server string"}{value}; } +sub ask_dir { + $ENV{wiz_do_file_sharing}; +} + +sub get_dir { + $old->{conf}->{public}{path}{value}; +} # remember one variable cannot be commented and not in the same file. sub do_it { @@ -147,6 +160,7 @@ sub do_it { $conf->homes() if $ENV{wiz_do_homes}; $conf->chg_var("global", "hosts allow", $ip); $conf->chg_var("global", "security", "share"); + $conf->chg_var("public", "patch", $ENV{wiz_dir}); $conf->write_conf("/etc/samba/smb.conf"); system("/etc/rc.d/init.d/smb restart"); 10; |