From 35e73086a7300f27358e4ba1f5ab786910cff3a929b0a342727dd3b210d79269 Mon Sep 17 00:00:00 2001 From: Olaf Hering Date: Tue, 21 Apr 2015 12:25:48 +0000 Subject: [PATCH] - bnc#927750 - Avoid errors reported by system-modules-load.service OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=359 --- xen-dom0-modules.service | 16 ++++++++++++++++ xen.changes | 5 +++++ xen.spec | 14 ++++++++++++++ xencommons.service | 4 ++++ 4 files changed, 39 insertions(+) create mode 100644 xen-dom0-modules.service diff --git a/xen-dom0-modules.service b/xen-dom0-modules.service new file mode 100644 index 0000000..3bc25a2 --- /dev/null +++ b/xen-dom0-modules.service @@ -0,0 +1,16 @@ +[Unit] +Description=Load dom0 backend drivers +ConditionPathExists=/proc/xen +Before=proc-xen.mount + +[Install] +WantedBy=multi-user.target + +[Service] +Type=oneshot +RemainAfterExit=true +Environment=PATH=/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin +# dummy to have always one valid line +ExecStart=-/usr/bin/env uname -a +# modules listed in /usr/lib/modules.d/xen.conf +# load them manually to avoid usage of system-modules-load.service diff --git a/xen.changes b/xen.changes index 38955c7..36197b0 100644 --- a/xen.changes +++ b/xen.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Apr 21 12:21:05 UTC 2015 - ohering@suse.de + +- bnc#927750 - Avoid errors reported by system-modules-load.service + ------------------------------------------------------------------- Wed Apr 8 10:17:41 UTC 2015 - rguenther@suse.com diff --git a/xen.spec b/xen.spec index 20de1aa..a2001ba 100644 --- a/xen.spec +++ b/xen.spec @@ -194,6 +194,7 @@ Source36: xnloader.py Source37: xen2libvirt.py # Systemd service files Source41: xencommons.service +Source42: xen-dom0-modules.service Source57: xen-utils-0.1.tar.bz2 # For xen-libs Source99: baselibs.conf @@ -868,6 +869,19 @@ enable xendomains.service EOF %endif cp -bavL %{S:41} $RPM_BUILD_ROOT%{_unitdir} +bn=`basename %{S:42}` +cp -bavL %{S:42} $RPM_BUILD_ROOT%{_unitdir}/${bn} +mods="` +for conf in $(ls $RPM_BUILD_ROOT%{with_systemd_modules_load}/*.conf) +do + grep -v ^# $conf + echo -n > $conf +done +`" +for mod in $mods +do + echo "ExecStart=-/usr/bin/env modprobe $mod" >> $RPM_BUILD_ROOT%{_unitdir}/${bn} +done rm -rfv $RPM_BUILD_ROOT%{_initddir} %else # Init scripts diff --git a/xencommons.service b/xencommons.service index 93d4b00..8ab2de1 100644 --- a/xencommons.service +++ b/xencommons.service @@ -2,6 +2,10 @@ Description=xencommons ConditionPathExists=/proc/xen/capabilities +# Avoid errors from systemd-modules-load.service +Requires=xen-dom0-modules.service +After=xen-dom0-modules.service + # Pull in all upstream service files Requires=proc-xen.mount After=proc-xen.mount