From 5d2d8e20eef3d4bd0f1cc6240fbebf604750215c Mon Sep 17 00:00:00 2001 From: Arnaud Desmons Date: Wed, 25 Sep 2002 12:24:55 +0000 Subject: added shared dir page --- samba_wizard/scripts/Smbconf.pm | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'samba_wizard') 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; -- cgit v1.2.1