From 5ed0dcf4d552271115d96d8d22b1a25494b85277 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Sun, 27 Aug 2017 01:48:23 +0900 Subject: [PATCH] test: drop Exec* prefixes to obtain paths of executables --- test/networkd-test.py | 2 +- test/test-functions | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/networkd-test.py b/test/networkd-test.py index 9bf7ee0019..5760ca5137 100755 --- a/test/networkd-test.py +++ b/test/networkd-test.py @@ -752,7 +752,7 @@ DNS=192.168.5.1 EOF # run networkd as in systemd-networkd.service -exec $(systemctl cat systemd-networkd.service | sed -n '/^ExecStart=/ { s/^.*=//; p}') +exec $(systemctl cat systemd-networkd.service | sed -n '/^ExecStart=/ { s/^.*=//; s/^[@+-]//; s/^!*//; p}') ''' % {'ifr': self.if_router, 'ifc': self.iface, 'addr6': ipv6 and 'Address=2600::1/64' or '', 'dhopts': dhcpserver_opts or ''}) diff --git a/test/test-functions b/test/test-functions index 67fe5e19b8..745c0a9abe 100644 --- a/test/test-functions +++ b/test/test-functions @@ -426,7 +426,7 @@ install_execs() { systemduserunitdir=$(pkg-config --variable=systemduserunitdir systemd) egrep -ho '^Exec[^ ]*=[^ ]+' $initdir/{$systemdsystemunitdir,$systemduserunitdir}/*.service \ | while read i; do - i=${i##Exec*=}; i=${i##-} + i=${i##Exec*=}; i=${i##[@+\!-]}; i=${i##\!} # some {rc,halt}.local scripts and programs are okay to not exist, the rest should inst $i || [ "${i%.local}" != "$i" ] || [ "${i%systemd-update-done}" != "$i" ] done