summaryrefslogtreecommitdiffstats
path: root/samba_wizard/scripts
diff options
context:
space:
mode:
authorArnaud Desmons <adesmons@mandriva.com>2002-09-25 12:24:55 +0000
committerArnaud Desmons <adesmons@mandriva.com>2002-09-25 12:24:55 +0000
commit5d2d8e20eef3d4bd0f1cc6240fbebf604750215c (patch)
treee89980b86695630c3d23a4089f2eaa089a7d9f26 /samba_wizard/scripts
parent0ce058b69f4160d25ccb98415a9f809c720fd34e (diff)
downloaddrakwizard-5d2d8e20eef3d4bd0f1cc6240fbebf604750215c.tar
drakwizard-5d2d8e20eef3d4bd0f1cc6240fbebf604750215c.tar.gz
drakwizard-5d2d8e20eef3d4bd0f1cc6240fbebf604750215c.tar.bz2
drakwizard-5d2d8e20eef3d4bd0f1cc6240fbebf604750215c.tar.xz
drakwizard-5d2d8e20eef3d4bd0f1cc6240fbebf604750215c.zip
added shared dir page
Diffstat (limited to 'samba_wizard/scripts')
-rwxr-xr-xsamba_wizard/scripts/Smbconf.pm14
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;