systemd: properly check DefaultDependencies is read only
on systemd v208 in Centos7 and Fedora20 error is not:
"org.freedesktop.DBus.Error.PropertyReadOnly"
but:
"property.org.freedesktop.DBus.Error.PropertyReadOnly"
so check failes and in Docker we get:
Docker daemon: System error: Cannot set property DefaultDependencies, or
unknown property
Fix for commit:
99233fde8c
Signed-off-by: Pavel Tikhomirov <ptikhomirov@parallels.com>
This commit is contained in:
parent
b6cf7a6c85
commit
dc4bd4cece
|
@ -91,7 +91,7 @@ func UseSystemd() bool {
|
|||
ddf := newProp("DefaultDependencies", false)
|
||||
if _, err := theConn.StartTransientUnit("docker-systemd-test-default-dependencies.scope", "replace", ddf); err != nil {
|
||||
if dbusError, ok := err.(dbus.Error); ok {
|
||||
if dbusError.Name == "org.freedesktop.DBus.Error.PropertyReadOnly" {
|
||||
if strings.Contains(dbusError.Name, "org.freedesktop.DBus.Error.PropertyReadOnly") {
|
||||
hasTransientDefaultDependencies = false
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue