mirror of
https://github.com/systemd/systemd.git
synced 2024-12-22 17:35:35 +03:00
busctl: when --address is specified do not assume we connect to a full bus
This commit is contained in:
parent
79f34de9fb
commit
b18ec7e29f
@ -1612,6 +1612,12 @@ int main(int argc, char *argv[]) {
|
||||
if (arg_address)
|
||||
r = sd_bus_set_address(bus, arg_address);
|
||||
else {
|
||||
r = sd_bus_set_bus_client(bus, true);
|
||||
if (r < 0) {
|
||||
log_error("Failed to set bus client: %s", strerror(-r));
|
||||
goto finish;
|
||||
}
|
||||
|
||||
switch (arg_transport) {
|
||||
|
||||
case BUS_TRANSPORT_LOCAL:
|
||||
@ -1638,12 +1644,6 @@ int main(int argc, char *argv[]) {
|
||||
goto finish;
|
||||
}
|
||||
|
||||
r = sd_bus_set_bus_client(bus, true);
|
||||
if (r < 0) {
|
||||
log_error("Failed to set bus client: %s", strerror(-r));
|
||||
goto finish;
|
||||
}
|
||||
|
||||
r = sd_bus_start(bus);
|
||||
if (r < 0) {
|
||||
log_error("Failed to connect to bus: %s", strerror(-r));
|
||||
|
Loading…
Reference in New Issue
Block a user