]> xenbits.xensource.com Git - people/aperard/osstest.git/commitdiff
overlay-centos: RedHat: Setup osstest-confirm-booted.service (systemd)
authorAnthony PERARD <anthony.perard@citrix.com>
Wed, 15 Nov 2017 15:18:46 +0000 (15:18 +0000)
committerAnthony PERARD <anthony.perard@citrix.com>
Thu, 12 Jul 2018 15:49:19 +0000 (16:49 +0100)
This emulate the osstest-confirm-booted service that is done on Debian.

In order to have the service been started last:
- it is made dependent on multi-user.target which is the default target on systemd.
- it is part of osstest.target which depend on multi-user.target.
- the osstest.target is set as the new default.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
overlay-centos/etc/systemd/system/osstest-confirm-booted.service [new file with mode: 0644]
overlay-centos/etc/systemd/system/osstest.target [new file with mode: 0644]

diff --git a/overlay-centos/etc/systemd/system/osstest-confirm-booted.service b/overlay-centos/etc/systemd/system/osstest-confirm-booted.service
new file mode 100644 (file)
index 0000000..eae79ed
--- /dev/null
@@ -0,0 +1,28 @@
+# This is part of "osstest", an automated testing framework for Xen.
+# Copyright (C) 2017 Citrix Inc.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+[Unit]
+Description=Confirm fully booted
+After=multi-user.target
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+ExecStart=/usr/bin/touch /dev/shm/osstest-confirm-booted
+ExecStop=/usr/bin/rm -f /dev/shm/osstest-confirm-booted
+
+[Install]
+WantedBy=osstest.target
diff --git a/overlay-centos/etc/systemd/system/osstest.target b/overlay-centos/etc/systemd/system/osstest.target
new file mode 100644 (file)
index 0000000..7b98fc0
--- /dev/null
@@ -0,0 +1,19 @@
+# This is part of "osstest", an automated testing framework for Xen.
+# Copyright (C) 2017 Citrix Inc.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+[Unit]
+Requires=multi-user.target
+After=multi-user.target