]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: drop Exec* prefixes to obtain paths of executables 6672/head
authorYu Watanabe <watanabe.yu+github@gmail.com>
Sat, 26 Aug 2017 16:48:23 +0000 (01:48 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 30 Aug 2017 07:00:07 +0000 (16:00 +0900)
test/networkd-test.py
test/test-functions

index 9bf7ee0019d7a53eaf1dc9e64b3e3ad21c9ed5ba..5760ca5137a0c8841deaa9200e46083ab4f97513 100755 (executable)
@@ -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 ''})
 
index 67fe5e19b87f366c2827f66a5f3007ed101c2787..745c0a9abe8af350f207e5461f75559c1e4730f1 100644 (file)
@@ -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