summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnaud Desmons <adesmons@mandriva.com>2002-08-19 15:19:00 +0000
committerArnaud Desmons <adesmons@mandriva.com>2002-08-19 15:19:00 +0000
commit20c5db6f16b2a2cb7e2ab4402c3eced6dbf1789d (patch)
treec6b13c03e6734102fccb441cd0270132ca65bdf4
parente5f4ab49fdedb0986976ebcd5ba18fd98b6b92eb (diff)
downloaddrakwizard-20c5db6f16b2a2cb7e2ab4402c3eced6dbf1789d.tar
drakwizard-20c5db6f16b2a2cb7e2ab4402c3eced6dbf1789d.tar.gz
drakwizard-20c5db6f16b2a2cb7e2ab4402c3eced6dbf1789d.tar.bz2
drakwizard-20c5db6f16b2a2cb7e2ab4402c3eced6dbf1789d.tar.xz
drakwizard-20c5db6f16b2a2cb7e2ab4402c3eced6dbf1789d.zip
cleaned some comments
-rwxr-xr-xsamba_wizard/scripts/Smbconf.pm20
1 files changed, 10 insertions, 10 deletions
diff --git a/samba_wizard/scripts/Smbconf.pm b/samba_wizard/scripts/Smbconf.pm
index 0d2dae10..577c1870 100755
--- a/samba_wizard/scripts/Smbconf.pm
+++ b/samba_wizard/scripts/Smbconf.pm
@@ -14,6 +14,14 @@ use strict;
my %conf;
my @tab;
+my $o = DrakconnectConf->new();
+
+sub check {
+ $> and return 1;
+ $o->is_dhcp() and return 2;
+ 0;
+}
+
sub read_conf {
my ($file) = @_;
my $menu;
@@ -23,7 +31,7 @@ sub read_conf {
if (/^(\s*\;?\s*)\[(.*)\].*/) {
$menu = $2;
$conf{$menu}{__comment} = $1;
- }
+ }
elsif (/^(?!\#)(\s*\;*\s*)(.*?)\s*=\s*(.*)\s*$/) {
$conf{$menu}{$2}{value} = $3;
$conf{$menu}{$2}{comment} = $1;
@@ -91,17 +99,9 @@ sub printer_sharing {
sub do_it {
read_conf("__WIZ_HOME__/samba_wizard/scripts/smb.conf.default");
- 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";
- print $ENV{$_} . "\n";
- }
- Vareqval->commit($file, \%mdk);
chg_var("global", "workgroup", $ENV{wiz_workgroup});
chg_var("global", "server string", $ENV{wiz_banner});
- my $drakconnect_o = DrakconnectConf->new();
- my $ip = $drakconnect_o->get_from_known_dev("IP");
+ my $ip = $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);