sysext: install in rootbindir, remove template from unit
authorLuca Boccassi <luca.boccassi@microsoft.com>
Tue, 19 Jan 2021 17:23:57 +0000 (17:23 +0000)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 20 Jan 2021 14:25:03 +0000 (15:25 +0100)
This reverts commit 71ad75f30641b90f9ca0088869f164d9d085430f.

meson.build
units/meson.build
units/systemd-sysext.service [new file with mode: 0644]
units/systemd-sysext.service.in [deleted file]

index 14b919d0c9f671f49e4d0f971eb3d36567a82254..9b47e6ad03376261a4cbad63ee985a00fd1d6a83 100644 (file)
@@ -2212,7 +2212,7 @@ if conf.get('ENABLE_SYSEXT') == 1
                 link_with : [libshared],
                 install_rpath : rootlibexecdir,
                 install : true,
-                install_dir : rootlibexecdir)
+                install_dir : rootbindir)
 endif
 
 if conf.get('ENABLE_USERDB') == 1
index bdfb2e52ce24d356b1c20aaf3673ad9c5b719732..0d0eeea7530524b0349b11935d83a6752498aa45 100644 (file)
@@ -133,6 +133,7 @@ units = [
         ['systemd-poweroff.service',            ''],
         ['systemd-reboot.service',              ''],
         ['systemd-rfkill.socket',               'ENABLE_RFKILL'],
+        ['systemd-sysext.service',              'ENABLE_SYSEXT'],
         ['systemd-sysusers.service',            'ENABLE_SYSUSERS',
          'sysinit.target.wants/'],
         ['systemd-tmpfiles-clean.service',      'ENABLE_TMPFILES'],
@@ -211,7 +212,6 @@ in_units = [
         ['systemd-oomd.service',                 'ENABLE_OOMD'],
         ['systemd-portabled.service',            'ENABLE_PORTABLED',
          'dbus-org.freedesktop.portable1.service'],
-        ['systemd-sysext.service',               'ENABLE_SYSEXT'],
         ['systemd-userdbd.service',              'ENABLE_USERDB'],
         ['systemd-homed.service',                'ENABLE_HOMED'],
         ['systemd-quotacheck.service',           'ENABLE_QUOTACHECK'],
diff --git a/units/systemd-sysext.service b/units/systemd-sysext.service
new file mode 100644 (file)
index 0000000..cc31f9c
--- /dev/null
@@ -0,0 +1,31 @@
+#  SPDX-License-Identifier: LGPL-2.1-or-later
+#
+#  This file is part of systemd.
+#
+#  systemd is free software; you can redistribute it and/or modify it
+#  under the terms of the GNU Lesser General Public License as published by
+#  the Free Software Foundation; either version 2.1 of the License, or
+#  (at your option) any later version.
+
+[Unit]
+Description=Merge System Extension Images into /usr/ and /opt/
+Documentation=man:systemd-sysext.service(8)
+DefaultDependencies=no
+Conflicts=shutdown.target
+After=local-fs.target
+Before=sysinit.target shutdown.target systemd-tmpfiles.service
+ConditionCapability=CAP_SYS_ADMIN
+ConditionDirectoryNotEmpty=|/etc/extensions
+ConditionDirectoryNotEmpty=|/run/extensions
+ConditionDirectoryNotEmpty=|/var/lib/extensions
+ConditionDirectoryNotEmpty=|/usr/local/lib/extensions
+ConditionDirectoryNotEmpty=|/usr/lib/extensions
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+ExecStart=systemd-sysext --merge
+ExecStop=systemd-sysext --unmerge
+
+[Install]
+WantedBy=sysinit.target
diff --git a/units/systemd-sysext.service.in b/units/systemd-sysext.service.in
deleted file mode 100644 (file)
index aee30cc..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-#  SPDX-License-Identifier: LGPL-2.1-or-later
-#
-#  This file is part of systemd.
-#
-#  systemd is free software; you can redistribute it and/or modify it
-#  under the terms of the GNU Lesser General Public License as published by
-#  the Free Software Foundation; either version 2.1 of the License, or
-#  (at your option) any later version.
-
-[Unit]
-Description=Merge System Extension Images into /usr/ and /opt/
-Documentation=man:systemd-sysext.service(8)
-DefaultDependencies=no
-Conflicts=shutdown.target
-After=local-fs.target
-Before=sysinit.target shutdown.target systemd-tmpfiles.service
-ConditionCapability=CAP_SYS_ADMIN
-ConditionDirectoryNotEmpty=|/etc/extensions
-ConditionDirectoryNotEmpty=|/run/extensions
-ConditionDirectoryNotEmpty=|/var/lib/extensions
-ConditionDirectoryNotEmpty=|/usr/local/lib/extensions
-ConditionDirectoryNotEmpty=|/usr/lib/extensions
-
-[Service]
-Type=oneshot
-RemainAfterExit=yes
-ExecStart=@rootlibexecdir@/systemd-sysext --merge
-ExecStop=@rootlibexecdir@/systemd-sysext --unmerge
-
-[Install]
-WantedBy=sysinit.target