summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2007-04-21 21:09:56 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:51:19 -0500
commitc6343915bfbdd4b5d6fd9c503384114b76adbee5 (patch)
tree5caae092ca139cef4b1a98566b07aa9d0828b896
parenta3954258705852d9a65468b8010f154093177a6f (diff)
downloadsamba-c6343915bfbdd4b5d6fd9c503384114b76adbee5.tar.gz
samba-c6343915bfbdd4b5d6fd9c503384114b76adbee5.tar.bz2
samba-c6343915bfbdd4b5d6fd9c503384114b76adbee5.zip
r22427: Abort in a few more cases of failure to provision.
Andrew Bartlett (This used to be commit 113544876f419dda185f3dff1c3c3a8833b2551f)
-rw-r--r--source4/script/tests/Samba4.pm10
1 files changed, 5 insertions, 5 deletions
diff --git a/source4/script/tests/Samba4.pm b/source4/script/tests/Samba4.pm
index 51740fae0e..4a94c9af90 100644
--- a/source4/script/tests/Samba4.pm
+++ b/source4/script/tests/Samba4.pm
@@ -257,7 +257,7 @@ nsslapd-pluginDescription: Allow bitwise matching rules
";
close(LDIF);
- system("$self->{bindir}/ad2oLschema $configuration -H $privatedir/sam.ldb --option=convert:target=fedora-ds -I $self->{setupdir}/schema-map-fedora-ds-1.0 -O $fedora_ds_dir/schema/99_ad.ldif >&2");
+ system("$self->{bindir}/ad2oLschema $configuration -H $privatedir/sam.ldb --option=convert:target=fedora-ds -I $self->{setupdir}/schema-map-fedora-ds-1.0 -O $fedora_ds_dir/schema/99_ad.ldif >&2") == 0 or die("schema conversion for Fedora DS failed");
return ($fedora_ds_dir, $pidfile);
}
@@ -359,10 +359,10 @@ syncprov-sessionlog 100
close(CONF);
#This uses the provision we just did, to read out the schema
- system("$self->{bindir}/ad2oLschema $configuration -H $privatedir/sam.ldb -I $self->{setupdir}/schema-map-openldap-2.3 -O $ldapdir/ad.schema >&2");
+ system("$self->{bindir}/ad2oLschema $configuration -H $privatedir/sam.ldb -I $self->{setupdir}/schema-map-openldap-2.3 -O $ldapdir/ad.schema >&2") == 0 or die("schema conversion for OpenLDAP failed");
#Now create an LDAP baseDN
- system("$self->{bindir}/smbscript $self->{setupdir}/provision $provision_options --ldap-base >&2");
+ system("$self->{bindir}/smbscript $self->{setupdir}/provision $provision_options --ldap-base >&2") == 0 or die("creating an OpenLDAP basedn failed");
my $oldpath = $ENV{PATH};
$ENV{PATH} = "/usr/local/sbin:/usr/sbin:/sbin:$ENV{PATH}";
@@ -531,10 +531,10 @@ sub provision($$$$$)
#Ensure the config file is valid before we start
if (system("$self->{bindir}/testparm $configuration -v --suppress-prompt >/dev/null 2>&1") != 0) {
system("$self->{bindir}/testparm $configuration >&2");
- die("Failed to create configuration!");
+ die("Failed to create a valid smb.conf configuration!");
}
- (system("($self->{bindir}/testparm $configuration -v --suppress-prompt --parameter-name=\"netbios name\" --section-name=global 2> /dev/null | grep -i ^$netbiosname ) >/dev/null 2>&1") == 0) or die("Failed to create configuration!");
+ (system("($self->{bindir}/testparm $configuration -v --suppress-prompt --parameter-name=\"netbios name\" --section-name=global 2> /dev/null | grep -i ^$netbiosname ) >/dev/null 2>&1") == 0) or die("Failed to create a valid smb.conf configuration!");
my @provision_options = ($configuration);
push (@provision_options, "--host-name=$netbiosname");