ldap/admin/src/scripts/52updateAESplugin.pl | 3 +-
ldap/admin/src/scripts/DSCreate.pm.in | 7 +++---
ldap/admin/src/scripts/start-dirsrv.in | 10 ++++----
m4/systemd.m4 | 32 +++++++++++++---------------
4 files changed, 26 insertions(+), 26 deletions(-)
New commits:
commit cbb8bf4b261a001f0183ff4abae49a8055a85ad3
Author: William Brown <firstyear(a)redhat.com>
Date: Mon May 9 11:47:28 2016 +1000
Ticket 48818 - Fix case where return code is always -1
Bug Description: Due to the docker process fixes, this made certain scripts
return the wrong code.
Fix Description: Fix the location where we get the return code.
In addition, this fix showed an issue in the start-dirsrv script that has
existed for a long time. This corrects that issue also.
https://fedorahosted.org/389/ticket/48818
Author: wibrown
Review by: mreynolds (Thanks!)
diff --git a/ldap/admin/src/scripts/DSCreate.pm.in
b/ldap/admin/src/scripts/DSCreate.pm.in
index 8c3fd04..cdbad35 100644
--- a/ldap/admin/src/scripts/DSCreate.pm.in
+++ b/ldap/admin/src/scripts/DSCreate.pm.in
@@ -719,16 +719,17 @@ sub startServer {
# We have to do this because docker is incapable of sane process management
# Sadly we have to sacrifice output collection, because of perl issues
my $cpid = open(my $output, "-|", "$startcmd 2>&1");
+ my $code = -512;
if ($cpid) {
# Parent process
waitpid($cpid,0);
+ $code = $?;
}
close($output);
- my $code = $?;
if ($code) {
- debug(0, "Process returned $code");
+ debug(0, "Process returned $code\n");
} else {
- debug(1, "Process returned $code");
+ debug(1, "Process returned $code\n");
}
# try to open the server error log
diff --git a/ldap/admin/src/scripts/start-dirsrv.in
b/ldap/admin/src/scripts/start-dirsrv.in
index 410786b..e3c46e3 100755
--- a/ldap/admin/src/scripts/start-dirsrv.in
+++ b/ldap/admin/src/scripts/start-dirsrv.in
@@ -80,15 +80,15 @@ start_instance() {
loop_counter=`expr $loop_counter + 1`
if test -f $PIDFILE ; then
PID=`cat $PIDFILE`
- return 0;
- else
- # I'm not sure what this meant to achieve, but $PID is 0 here.
- if kill -s 0 $PID > /dev/null 2>&1 ; then
- sleep 1
+ # if kill -s 0 $PID > /dev/null 2>&1 ; then
+ if kill -s 0 $PID ; then
+ return 0;
else
echo Server failed to start !!! Please check errors log for problems
return 1
fi
+ else
+ sleep 1
fi
done
echo Server not running!! Failed to start ns-slapd process. Please check the errors
log for problems.
commit d18fa559549350fc3d24a87093bd8a37ffb7cfd6
Author: William Brown <firstyear(a)redhat.com>
Date: Mon May 9 13:35:09 2016 +1000
Ticket 48826 - 52updateAESplugin.pl may fail on older versions of perl
Bug Description: The warning class for warnings 'experimental::smartmatch';
does not exist on EL7
Fix Description: Check the perl version before attempting the warning.
https://fedorahosted.org/389/ticket/48826
Author: wibrown
Review by: mreynolds (Thanks!)
diff --git a/ldap/admin/src/scripts/52updateAESplugin.pl
b/ldap/admin/src/scripts/52updateAESplugin.pl
index ae258b6..9a27729 100644
--- a/ldap/admin/src/scripts/52updateAESplugin.pl
+++ b/ldap/admin/src/scripts/52updateAESplugin.pl
@@ -6,7 +6,8 @@ use File::Basename;
use File::Copy;
use DSUtil qw(debug serverIsRunning);
-no warnings 'experimental::smartmatch';
+# no warnings 'experimental::smartmatch';
+no if $] >= 5.017011, warnings => 'experimental::smartmatch';
#
# Check if there is a DES plugin and make sure the AES plugin contains the same
attributes
commit 5400067e770457a09e0415adbba691e67f03a38d
Author: William Brown <firstyear(a)redhat.com>
Date: Mon May 9 10:32:35 2016 +1000
Ticket 48825 - Configure make generate invalid makefile
Bug Description: In some cases it was possible for configure to generate an
invalid makefile. This was in the case that systemd was enabled,
Fix Description: Remove the optional test around the groupname check. It should
always have a default.
https://fedorahosted.org/389/ticket/48825
Author: wibrown
Review by: mreynolds (Thanks!)
diff --git a/m4/systemd.m4 b/m4/systemd.m4
index 939af4f..a6dd302 100644
--- a/m4/systemd.m4
+++ b/m4/systemd.m4
@@ -103,24 +103,22 @@ if test "$with_systemd" = yes; then
fi
AC_SUBST(with_systemdsystemconfdir)
- if test -n "$with_systemdsystemunitdir" -o -n
"$with_systemdsystemconfdir" ; then
- if test -z "$with_systemdgroupname" ; then
- with_systemdgroupname=$PACKAGE_NAME.target
- fi
- AC_MSG_CHECKING(for --with-systemdgroupname)
- AC_ARG_WITH([systemdgroupname],
- AS_HELP_STRING([--with-systemdgroupname=NAME],
- [Name of group target for all instances (default:
$with_systemdgroupname)])
- )
- if test "$with_systemdgroupname" = yes ; then
- AC_MSG_ERROR([You must specify --with-systemdgroupname=name.of.group])
- elif test "$with_systemdgroupname" = no ; then
- AC_MSG_ERROR([You must specify --with-systemdgroupname=name.of.group])
- else
- AC_MSG_RESULT([$with_systemdgroupname])
- fi
- AC_SUBST(with_systemdgroupname)
+ if test -z "$with_systemdgroupname" ; then
+ with_systemdgroupname=$PACKAGE_NAME.target
fi
+ AC_MSG_CHECKING(for --with-systemdgroupname)
+ AC_ARG_WITH([systemdgroupname],
+ AS_HELP_STRING([--with-systemdgroupname=NAME],
+ [Name of group target for all instances (default:
$with_systemdgroupname)])
+ )
+ if test "$with_systemdgroupname" = yes ; then
+ AC_MSG_ERROR([You must specify --with-systemdgroupname=name.of.group])
+ elif test "$with_systemdgroupname" = no ; then
+ AC_MSG_ERROR([You must specify --with-systemdgroupname=name.of.group])
+ else
+ AC_MSG_RESULT([$with_systemdgroupname])
+ fi
+ AC_SUBST(with_systemdgroupname)
fi