Monday, May 22, 2017

[389-commits] [389-ds-base] 01/01: Ticket 49099 - resolve systemd startup interaction with ns

This is an automated email from the git hooks/post-receive script.

firstyear pushed a commit to branch master
in repository 389-ds-base.

commit d3aa098cf629bab2e1c044777dce041a3cbd1941
Author: William Brown <firstyear@redhat.com>
Date: Mon May 22 13:40:47 2017 +1000

Ticket 49099 - resolve systemd startup interaction with ns

Bug Description: In systemd, it expects our process to stay in
the foreground. Due to a mistake, I put config parsing after
systemd parsing, which meant that we over-wrote the setting

Fix Description: Move systemd notify processing to after
command line processing.

https://pagure.io/389-ds-base/issue/49099

Author: wibrown

Review by: vashirov, mreynolds (Thanks!)
---
ldap/servers/slapd/main.c | 21 +++++++++++----------
1 file changed, 11 insertions(+), 10 deletions(-)

diff --git a/ldap/servers/slapd/main.c b/ldap/servers/slapd/main.c
index 85e4c6f..bc65775 100644
--- a/ldap/servers/slapd/main.c
+++ b/ldap/servers/slapd/main.c
@@ -676,7 +676,18 @@ main( int argc, char **argv)
}
}

+
+ /* used to set configfile to the default config file name here */
+ if ( (myname = strrchr( argv[0], '/' )) == NULL ) {
+ myname = slapi_ch_strdup( argv[0] );
+ } else {
+ myname = slapi_ch_strdup( myname + 1 );
+ }
+
+ process_command_line(argc,argv,&extraname);
+
#ifdef WITH_SYSTEMD
+ /* Note: Must come *after* processing CLI, to override the should_detach flag */
/*
* HUGE WARNING: Systemd has some undocumented magic. with Type=notify, this
* acts as type=simple, but waits for ns-slapd to tell systemd it's good to go.
@@ -696,16 +707,6 @@ main( int argc, char **argv)
}

No comments:

Post a Comment