[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [OSSTEST RFC 09/16] CentOS: Setup osstest-confirm-booted.service
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@xxxxxxxxxx> --- Osstest/CentOS.pm | 7 ++++++ .../systemd/system/osstest-confirm-booted.service | 28 ++++++++++++++++++++++ overlay-centos/etc/systemd/system/osstest.target | 19 +++++++++++++++ 3 files changed, 54 insertions(+) create mode 100644 overlay-centos/etc/systemd/system/osstest-confirm-booted.service create mode 100644 overlay-centos/etc/systemd/system/osstest.target diff --git a/Osstest/CentOS.pm b/Osstest/CentOS.pm index dbba354..28c8193 100644 --- a/Osstest/CentOS.pm +++ b/Osstest/CentOS.pm @@ -119,6 +119,13 @@ sub kickstart_base ($$;@) { kickstart_ssh($ho, $sfx); kickstart_hook_overlay($ho, $sfx, $c{OverlayLocal}, 'overlay-local.tar'); + kickstart_hook_overlay($ho, $sfx, 'overlay-centos', 'overlay.tar'); + kickstart_hook_command($ho, 'post', $sfx, <<END); +#!/bin/sh +set -ex +systemctl enable osstest-confirm-booted.service +systemctl set-default osstest.target +END my $ntpserver = get_target_property($ho,'NtpServer'); if ($ntpserver) { 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 index 0000000..eae79ed --- /dev/null +++ b/overlay-centos/etc/systemd/system/osstest-confirm-booted.service @@ -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 index 0000000..7b98fc0 --- /dev/null +++ b/overlay-centos/etc/systemd/system/osstest.target @@ -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 -- Anthony PERARD _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |