diff options
author | Arnaud Desmons <adesmons@mandriva.com> | 2002-08-01 09:39:52 +0000 |
---|---|---|
committer | Arnaud Desmons <adesmons@mandriva.com> | 2002-08-01 09:39:52 +0000 |
commit | d4c52e0a97ac1cf886d54445360a8879949a6838 (patch) | |
tree | cdf17dabbc2a0fb0d7c14f6abbb84539d22fadc6 | |
parent | c128af3804343ff94a4edf1cc2fa82cbcf1698be (diff) | |
download | drakwizard-d4c52e0a97ac1cf886d54445360a8879949a6838.tar drakwizard-d4c52e0a97ac1cf886d54445360a8879949a6838.tar.gz drakwizard-d4c52e0a97ac1cf886d54445360a8879949a6838.tar.bz2 drakwizard-d4c52e0a97ac1cf886d54445360a8879949a6838.tar.xz drakwizard-d4c52e0a97ac1cf886d54445360a8879949a6838.zip |
Pixel power
-rwxr-xr-x | samba_wizard/scripts/Smbconf.pm | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/samba_wizard/scripts/Smbconf.pm b/samba_wizard/scripts/Smbconf.pm index 0b3f8e87..385ef2cc 100755 --- a/samba_wizard/scripts/Smbconf.pm +++ b/samba_wizard/scripts/Smbconf.pm @@ -84,22 +84,15 @@ sub printer_sharing { # remember one variable cannot be commented and not in the same file. -sub hello { - my ($str) = @_; - - print $str."\n"; -} - sub finish { my ($file, $device, $ip); - read_conf("__WIZ_HOME__/samba_wizard/scripts/smb.conf.default"); + read_conf("/home/logarno/drakwizard/samba_wizard/scripts/smb.conf.default"); $file = "/etc/sysconfig/mdk_serv"; my %mdk = Vareqval->get($file); - $mdk{wiz_banner} = $ENV{wiz_banner}; - $mdk{wiz_workgroup} = $ENV{wiz_workgroup}; - $mdk{wiz_do_printer_sharing} = $ENV{wiz_do_printer_sharing}; - $mdk{wiz_do_file_sharing} = $ENV{wiz_do_file_sharing}; + foreach (qw(wiz_banner wiz_workgroup wiz_do_printer_sharing wiz_do_file_sharing)) { + $mdk{$_} = $ENV{$_} if defined $ENV{$_} or die "$_ not in env"; + } Vareqval->commit($file, \%mdk); chg_var("global", "workgroup", $ENV{wiz_workgroup}); chg_var("global", "server string", $ENV{wiz_banner}); @@ -112,5 +105,6 @@ sub finish { chg_var("global", "security", "share"); write_conf("/etc/samba/smb.conf"); system("/etc/rc.d/init.d/smb restart >/dev/null 2>&1"); + 1; } 1; |