vendor: update go-systemd and godbus

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
This commit is contained in:
Akihiro Suda
2020-03-01 22:52:48 +09:00
parent 981dbef514
commit 492d525e55
65 changed files with 435 additions and 238 deletions

View File

@@ -67,7 +67,7 @@ func TLSListeners(tlsConfig *tls.Config) ([]net.Listener, error) {
return nil, err
}
if tlsConfig != nil && err == nil {
if tlsConfig != nil {
for i, l := range listeners {
// Activate TLS only for TCP sockets
if l.Addr().Network() == "tcp" {
@@ -88,7 +88,7 @@ func TLSListenersWithNames(tlsConfig *tls.Config) (map[string][]net.Listener, er
return nil, err
}
if tlsConfig != nil && err == nil {
if tlsConfig != nil {
for _, ll := range listeners {
// Activate TLS only for TCP sockets
for i, l := range ll {

View File

@@ -23,7 +23,7 @@ import (
"strings"
"sync"
"github.com/godbus/dbus"
"github.com/godbus/dbus/v5"
)
const (

View File

@@ -20,7 +20,7 @@ import (
"path"
"strconv"
"github.com/godbus/dbus"
"github.com/godbus/dbus/v5"
)
func (c *Conn) jobComplete(signal *dbus.Signal) {
@@ -197,6 +197,12 @@ func (c *Conn) GetUnitPathProperties(path dbus.ObjectPath) (map[string]interface
return c.getProperties(path, "org.freedesktop.systemd1.Unit")
}
// GetAllProperties takes the (unescaped) unit name and returns all of its dbus object properties.
func (c *Conn) GetAllProperties(unit string) (map[string]interface{}, error) {
path := unitPath(unit)
return c.getProperties(path, "")
}
func (c *Conn) getProperty(unit string, dbusInterface string, propertyName string) (*Property, error) {
var err error
var prop dbus.Variant

View File

@@ -15,7 +15,7 @@
package dbus
import (
"github.com/godbus/dbus"
"github.com/godbus/dbus/v5"
)
// From the systemd docs:
@@ -56,7 +56,7 @@ type execStart struct {
// http://www.freedesktop.org/software/systemd/man/systemd.service.html#ExecStart=
func PropExecStart(command []string, uncleanIsFailure bool) Property {
execStarts := []execStart{
execStart{
{
Path: command[0],
Args: command,
UncleanIsFailure: uncleanIsFailure,

View File

@@ -19,7 +19,7 @@ import (
"log"
"time"
"github.com/godbus/dbus"
"github.com/godbus/dbus/v5"
)
const (