summaryrefslogtreecommitdiffstats
path: root/samba_wizard/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'samba_wizard/scripts')
-rwxr-xr-xsamba_wizard/scripts/Smbconf.pm9
1 files changed, 7 insertions, 2 deletions
diff --git a/samba_wizard/scripts/Smbconf.pm b/samba_wizard/scripts/Smbconf.pm
index 385ef2cc..583c8411 100755
--- a/samba_wizard/scripts/Smbconf.pm
+++ b/samba_wizard/scripts/Smbconf.pm
@@ -72,13 +72,16 @@ sub chg_var {
$conf{$menu}{$var}{value} = $str;
}
+
sub file_sharing {
+ standalone::explanations("Enabling samba file sharing");
comment_menu("homes", ";");
comment_menu("public", "");
chg_var("global", "security", "share");
}
sub printer_sharing {
+ standalone::explanations("Enabling samba printer sharing");
comment_menu("printers", "");
}
@@ -92,6 +95,7 @@ sub finish {
my %mdk = Vareqval->get($file);
foreach (qw(wiz_banner wiz_workgroup wiz_do_printer_sharing wiz_do_file_sharing)) {
$mdk{$_} = $ENV{$_} if defined $ENV{$_} or die "$_ not in env";
+ print $ENV{$_} . "\n";
}
Vareqval->commit($file, \%mdk);
chg_var("global", "workgroup", $ENV{wiz_workgroup});
@@ -99,8 +103,8 @@ sub finish {
$device = $mdk{wiz_device};
my %mdk = Vareqval->get("/etc/sysconfig/network-scripts/ifcfg-".$device);
$ip = $mdk{IPADDR};
- ($ENV{wiz_do_file_sharing} eq "true") and file_sharing();
- ($ENV{wiz_do_printer_sharing} eq "enabled") and printer_sharing();
+ file_sharing() if $ENV{wiz_do_file_sharing};
+ printer_sharing() if $ENV{wiz_do_printer_sharing};
chg_var("global", "hosts allow", $ip);
chg_var("global", "security", "share");
write_conf("/etc/samba/smb.conf");
@@ -108,3 +112,4 @@ sub finish {
1;
}
1;
+