diff options
author | Arnaud Desmons <adesmons@mandriva.com> | 2002-08-07 11:25:17 +0000 |
---|---|---|
committer | Arnaud Desmons <adesmons@mandriva.com> | 2002-08-07 11:25:17 +0000 |
commit | dbd50c9c4890f3e1c489ffd1bcc4ece19f89bdc5 (patch) | |
tree | df8e5d99575faeaa5076132b7879882a3b8bf2b6 | |
parent | 1075c75ced12036e45fbc738bacbfe16dd2fa669 (diff) | |
download | drakwizard-dbd50c9c4890f3e1c489ffd1bcc4ece19f89bdc5.tar drakwizard-dbd50c9c4890f3e1c489ffd1bcc4ece19f89bdc5.tar.gz drakwizard-dbd50c9c4890f3e1c489ffd1bcc4ece19f89bdc5.tar.bz2 drakwizard-dbd50c9c4890f3e1c489ffd1bcc4ece19f89bdc5.tar.xz drakwizard-dbd50c9c4890f3e1c489ffd1bcc4ece19f89bdc5.zip |
use of Drakconnect conf
-rwxr-xr-x | samba_wizard/scripts/Smbconf.pm | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/samba_wizard/scripts/Smbconf.pm b/samba_wizard/scripts/Smbconf.pm index 264798e8..0d2dae10 100755 --- a/samba_wizard/scripts/Smbconf.pm +++ b/samba_wizard/scripts/Smbconf.pm @@ -2,6 +2,7 @@ package Smbconf; require "__WIZ_HOME__/common/scripts/Vareqval.pm"; +require "__WIZ_HOME__/common/scripts/DrakconnectConf.pm"; use strict; @@ -74,24 +75,23 @@ sub chg_var { sub file_sharing { - standalone::explanations("Enabling samba 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"); + standalone->explanations("Enabling samba printer sharing"); comment_menu("printers", ""); } # remember one variable cannot be commented and not in the same file. sub do_it { - my ($file, $device, $ip); read_conf("__WIZ_HOME__/samba_wizard/scripts/smb.conf.default"); - $file = "/etc/sysconfig/mdk_serv"; + my $file = "/etc/sysconfig/mdk_serv"; 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"; @@ -100,9 +100,8 @@ sub do_it { Vareqval->commit($file, \%mdk); chg_var("global", "workgroup", $ENV{wiz_workgroup}); chg_var("global", "server string", $ENV{wiz_banner}); - $device = $mdk{wiz_device}; - my %mdk = Vareqval->get("/etc/sysconfig/network-scripts/ifcfg-".$device); - $ip = $mdk{IPADDR}; + my $drakconnect_o = DrakconnectConf->new(); + my $ip = $drakconnect_o->get_from_known_dev("IP"); file_sharing() if $ENV{wiz_do_file_sharing}; printer_sharing() if $ENV{wiz_do_printer_sharing}; chg_var("global", "hosts allow", $ip); |