#50172 Ticket 50169 - lib389 change hardcoded systemctl path
Closed 3 years ago by spichugi. Opened 5 years ago by mreynolds.
mreynolds/389-ds-base ticket50169  into  master

@@ -1206,9 +1206,9 @@ 

  

          if self.with_systemd() and not self.containerised:

              # Do systemd things here ...

-             subprocess.check_call(["/usr/bin/systemctl",

-                                     "start",

-                                     "dirsrv@%s" % self.serverid])

+             subprocess.check_call(["systemctl",

+                                    "start",

+                                    "dirsrv@%s" % self.serverid])

          else:

              # Start the process.

              # Wait for it to terminate
@@ -1269,9 +1269,9 @@ 

  

          if self.with_systemd() and not self.containerised:

              # Do systemd things here ...

-             subprocess.check_call(["/usr/bin/systemctl",

-                                     "stop",

-                                     "dirsrv@%s" % self.serverid])

+             subprocess.check_call(["systemctl",

+                                    "stop",

+                                    "dirsrv@%s" % self.serverid])

          else:

              # TODO: Make the pid path in the files things

              # TODO: use the status call instead!!!!
@@ -1296,9 +1296,9 @@ 

          """

          if self.with_systemd() and not self.containerised:

              # Do systemd things here ...

-             rc = subprocess.call(["/usr/bin/systemctl",

-                                     "is-active", "--quiet",

-                                     "dirsrv@%s" % self.serverid])

+             rc = subprocess.call(["systemctl",

+                                   "is-active", "--quiet",

+                                   "dirsrv@%s" % self.serverid])

              if rc == 0:

                  return True

                  # This .... probably will mess something up

@@ -714,9 +714,9 @@ 

          # If we are on the correct platform settings, systemd

          if general['systemd'] and not self.containerised:

              # Should create the symlink we need, but without starting it.

-             subprocess.check_call(["/usr/bin/systemctl",

-                                     "enable",

-                                     "dirsrv@%s" % slapd['instance_name']])

+             subprocess.check_call(["systemctl",

+                                    "enable",

+                                    "dirsrv@%s" % slapd['instance_name']])

  

              # Setup tmpfiles_d

              tmpfile_d = ds_paths.tmpfiles_d + "/dirsrv-" + slapd['instance_name'] + ".conf"

Description:

Currently the server is using "/usr/bin/systemctl", but
this fails on Debian. There is no need for a path anyway
so jsut strip it.

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

rebased onto c57528b

5 years ago

Pull-Request has been merged by mreynolds

5 years ago

389-ds-base is moving from Pagure to Github. This means that new issues and pull requests
will be accepted only in 389-ds-base's github repository.

This pull request has been cloned to Github as issue and is available here:
- https://github.com/389ds/389-ds-base/issues/3231

If you want to continue to work on the PR, please navigate to the github issue,
download the patch from the attachments and file a new pull request.

Thank you for understanding. We apologize for all inconvenience.

Pull-Request has been closed by spichugi

3 years ago