summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnaud Desmons <adesmons@mandriva.com>2002-09-12 09:07:11 +0000
committerArnaud Desmons <adesmons@mandriva.com>2002-09-12 09:07:11 +0000
commit4e6479359c87006a17792e0d1c8e43fe76d2b7b1 (patch)
tree6e72acdf73973e94b8b3c3543016877e1020c989
parent0d0c2a95c4cd388197d191fc0129b54ad34f7eb2 (diff)
downloaddrakwizard-4e6479359c87006a17792e0d1c8e43fe76d2b7b1.tar
drakwizard-4e6479359c87006a17792e0d1c8e43fe76d2b7b1.tar.gz
drakwizard-4e6479359c87006a17792e0d1c8e43fe76d2b7b1.tar.bz2
drakwizard-4e6479359c87006a17792e0d1c8e43fe76d2b7b1.tar.xz
drakwizard-4e6479359c87006a17792e0d1c8e43fe76d2b7b1.zip
added some check func and globalize old conf
-rw-r--r--samba_wizard/samba.wiz4
-rwxr-xr-xsamba_wizard/scripts/Smbconf.pm14
2 files changed, 14 insertions, 4 deletions
diff --git a/samba_wizard/samba.wiz b/samba_wizard/samba.wiz
index c71a3794..58e91692 100644
--- a/samba_wizard/samba.wiz
+++ b/samba_wizard/samba.wiz
@@ -153,7 +153,7 @@
<Page
helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-samba.html"
name="ask_workgroup"
- jumpScript="__WIZ_HOME__/samba_wizard/scripts/check_workgroup.sh"
+ func="check_workgroup"
executionLevel="NORMAL"
nextFinish="false"
canBack="true"
@@ -214,7 +214,7 @@
<Page
helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-samba.html"
name="ask_banner"
- jumpScript="__WIZ_HOME__/samba_wizard/scripts/check_banner.sh"
+ func="check_banner"
executionLevel="NORMAL"
nextFinish="false"
canBack="true"
diff --git a/samba_wizard/scripts/Smbconf.pm b/samba_wizard/scripts/Smbconf.pm
index 4e91d6c0..78c0bb65 100755
--- a/samba_wizard/scripts/Smbconf.pm
+++ b/samba_wizard/scripts/Smbconf.pm
@@ -115,13 +115,23 @@ sub printer_sharing {
$self->comment_menu("printers", "");
}
+sub check_workgroup {
+ !$ENV{workgroup} and return 1;
+ 10;
+}
+
+sub check_banner {
+ !$ENV{banner} and return 1;
+ 10;
+}
+
+my $old = read_conf("/etc/samba/smb.conf");
+
sub get_workgroup {
- my $old = read_conf("/etc/samba/smb.conf");
$old->{conf}->{global}{workgroup}{value};
}
sub get_banner {
- my $old = read_conf("/etc/samba/smb.conf");
$old->{conf}->{global}{"server string"}{value};
}