</listitem>
</varlistentry>
+ <varlistentry>
+ <term><option>--watch-bind=</option><replaceable>BOOL</replaceable></term>
+
+ <listitem>
+ <para>Controls whether to wait for the specified <constant>AF_UNIX</constant> bus socket to appear in the
+ file system before connecting to it. Defaults to off. When enabled, the tool will watch the file system until
+ the socket is created and then connect to it.</para>
+ </listitem>
+ </varlistentry>
+
<xi:include href="user-system-options.xml" xpointer="user" />
<xi:include href="user-system-options.xml" xpointer="system" />
<xi:include href="user-system-options.xml" xpointer="host" />
static bool arg_auto_start = true;
static bool arg_allow_interactive_authorization = true;
static bool arg_augment_creds = true;
+static bool arg_watch_bind = false;
static usec_t arg_timeout = 0;
#define NAME_IS_ACQUIRED INT_TO_PTR(1)
" --allow-interactive-authorization=BOOL\n"
" Allow interactive authorization for operation\n"
" --timeout=SECS Maximum time to wait for method call completion\n"
- " --augment-creds=BOOL Extend credential data with data read from /proc/$PID\n\n"
+ " --augment-creds=BOOL Extend credential data with data read from /proc/$PID\n"
+ " --watch-bind=BOOL Wait for bus AF_UNIX socket to be bound in the file\n"
+ " system\n\n"
"Commands:\n"
" list List bus names\n"
" status [SERVICE] Show bus service, process or bus owner credentials\n"
ARG_ALLOW_INTERACTIVE_AUTHORIZATION,
ARG_TIMEOUT,
ARG_AUGMENT_CREDS,
+ ARG_WATCH_BIND,
};
static const struct option options[] = {
{ "allow-interactive-authorization", required_argument, NULL, ARG_ALLOW_INTERACTIVE_AUTHORIZATION },
{ "timeout", required_argument, NULL, ARG_TIMEOUT },
{ "augment-creds",required_argument, NULL, ARG_AUGMENT_CREDS},
+ { "watch-bind", required_argument, NULL, ARG_WATCH_BIND },
{},
};
arg_augment_creds = !!r;
break;
+ case ARG_WATCH_BIND:
+ r = parse_boolean(optarg);
+ if (r < 0) {
+ log_error("Failed to parse --watch-bind= parameter.");
+ return r;
+ }
+
+ arg_watch_bind = !!r;
+ break;
+
case '?':
return -EINVAL;
goto finish;
}
+ r = sd_bus_set_watch_bind(bus, arg_watch_bind);
+ if (r < 0) {
+ log_error_errno(r, "Failed to set watch-bind setting to '%s': %m", yes_no(arg_watch_bind));
+ goto finish;
+ }
+
if (arg_address)
r = sd_bus_set_address(bus, arg_address);
else {