chiark / gitweb /
systemctl: add --value option
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sun, 2 Aug 2015 18:22:10 +0000 (14:22 -0400)
committerSven Eden <yamakuzure@gmx.net>
Fri, 16 Jun 2017 08:12:57 +0000 (10:12 +0200)
With this option, systemctl will only print the rhs in show:
$ systemctl show -p Wants,After elogind-journald --value
elogind-journald.socket ...
elogind-journald-dev-log.socket ...

This is useful in scripts, because the need to call awk or similar
is removed.

src/login/loginctl.c

index 6812ec5d44cca54faba185a01e25d603ffd37f26..35310cf57ac057e1e72e25b295a2378a072008ba 100644 (file)
@@ -793,7 +793,7 @@ static int print_property(const char *name, sd_bus_message *m, const char *conte
                 break;
         }
 
-        r = bus_print_property(name, m, arg_all);
+        r = bus_print_property(name, m, false, arg_all);
         if (r < 0)
                 return bus_log_parse_error(r);