summaryrefslogtreecommitdiffstats
path: root/samba_wizard/scripts/Smbconf.pm
diff options
context:
space:
mode:
authorArnaud Desmons <adesmons@mandriva.com>2002-08-23 13:24:07 +0000
committerArnaud Desmons <adesmons@mandriva.com>2002-08-23 13:24:07 +0000
commitc8be0235d65a1cda14fa8cffc96cf86b72262094 (patch)
tree90cce49a58e7f53c3372e724806c1e257546ac48 /samba_wizard/scripts/Smbconf.pm
parent281d36357bab3a3a0c55fdb913964305a8b9cb61 (diff)
downloaddrakwizard-c8be0235d65a1cda14fa8cffc96cf86b72262094.tar
drakwizard-c8be0235d65a1cda14fa8cffc96cf86b72262094.tar.gz
drakwizard-c8be0235d65a1cda14fa8cffc96cf86b72262094.tar.bz2
drakwizard-c8be0235d65a1cda14fa8cffc96cf86b72262094.tar.xz
drakwizard-c8be0235d65a1cda14fa8cffc96cf86b72262094.zip
added homes
Diffstat (limited to 'samba_wizard/scripts/Smbconf.pm')
-rwxr-xr-xsamba_wizard/scripts/Smbconf.pm22
1 files changed, 17 insertions, 5 deletions
diff --git a/samba_wizard/scripts/Smbconf.pm b/samba_wizard/scripts/Smbconf.pm
index 577c1870..62b57ed2 100755
--- a/samba_wizard/scripts/Smbconf.pm
+++ b/samba_wizard/scripts/Smbconf.pm
@@ -3,7 +3,7 @@
package Smbconf;
require "__WIZ_HOME__/common/scripts/Vareqval.pm";
require "__WIZ_HOME__/common/scripts/DrakconnectConf.pm";
-
+use MDK::Common;
use strict;
# All possibilies in the config file must be precedeed by ";"
@@ -22,6 +22,11 @@ sub check {
0;
}
+sub check_services {
+ $ENV{wiz_do_homes} and return 2;
+ 0;
+}
+
sub read_conf {
my ($file) = @_;
my $menu;
@@ -81,14 +86,20 @@ sub chg_var {
$conf{$menu}{$var}{value} = $str;
}
-
sub file_sharing {
- standalone->explanations("Enabling samba file sharing");
- comment_menu("homes", ";");
+ mkdir_p("/home/samba/public");
+ standalone->explanations("Enabling samba /home/samba/public sharing");
+# comment_menu("homes", ";");
comment_menu("public", "");
chg_var("global", "security", "share");
}
+sub homes {
+ standalone->explanations("Enabling samba /home/samba/public sharing");
+ comment_menu("homes", "");
+ chg_var("global", "security", "share");
+}
+
sub printer_sharing {
standalone->explanations("Enabling samba printer sharing");
comment_menu("printers", "");
@@ -104,10 +115,11 @@ sub do_it {
my $ip = $o->get_from_known_dev("IP");
file_sharing() if $ENV{wiz_do_file_sharing};
printer_sharing() if $ENV{wiz_do_printer_sharing};
+ homes() if $ENV{wiz_do_homes};
chg_var("global", "hosts allow", $ip);
chg_var("global", "security", "share");
write_conf("/etc/samba/smb.conf");
- system("/etc/rc.d/init.d/smb restart >/dev/null 2>&1");
+ system("/etc/rc.d/init.d/smb restart");
10;
}
1;