diff --git a/proc-xen.mount b/proc-xen.mount new file mode 100644 index 0000000..7d24ea5 --- /dev/null +++ b/proc-xen.mount @@ -0,0 +1,7 @@ +[Unit] +Description=Mount /proc/xen files + +[Mount] +What=xenfs +Where=/proc/xen +Type=xenfs diff --git a/var-lib-xenstored.mount b/var-lib-xenstored.mount new file mode 100644 index 0000000..c6b9ccb --- /dev/null +++ b/var-lib-xenstored.mount @@ -0,0 +1,9 @@ +[Unit] +Description=mount xenstore file system +Requires=proc-xen.mount +After=proc-xen.mount + +[Mount] +What=xenstore +Where=/var/lib/xenstored +Type=tmpfs diff --git a/xen.spec b/xen.spec index 0771725..d396de4 100644 --- a/xen.spec +++ b/xen.spec @@ -30,6 +30,10 @@ Source23: init.xend Source30: sysconfig.xenstored Source31: sysconfig.xenconsoled Source32: sysconfig.blktapctrl +# systemd bits +Source40: proc-xen.mount +Source41: var-lib-xenstored.mount +Source42: xenstored.mount Patch1: xen-initscript.patch Patch4: xen-dumpdir.patch @@ -267,6 +271,12 @@ install -m 644 %{SOURCE30} %{buildroot}%{_sysconfdir}/sysconfig/xenstored install -m 644 %{SOURCE31} %{buildroot}%{_sysconfdir}/sysconfig/xenconsoled install -m 644 %{SOURCE32} %{buildroot}%{_sysconfdir}/sysconfig/blktapctrl +# sysconfig +mkdir -p %{buildroot}/lib/systemd/system +install -m 644 %{SOURCE40} %{buildroot}/lib/systemd/system/proc-xen.mount +install -m 644 %{SOURCE41} %{buildroot}/lib/systemd/system/var-lib-xenstored.mount +install -m 644 %{SOURCE42} %{buildroot}/lib/systemd/system/xenstored.service + # config file only used for hotplug, Fedora uses udev instead rm -f %{buildroot}/%{_sysconfdir}/sysconfig/xend @@ -403,6 +413,10 @@ rm -rf %{buildroot} %{_sysconfdir}/rc.d/init.d/xencommons %{_sysconfdir}/bash_completion.d/xl.sh +/lib/systemd/system/proc-xen.mount +/lib/systemd/system/var-lib-xenstored.mount +/lib/systemd/system/xenstored.service + %config(noreplace) %{_sysconfdir}/sysconfig/xenstored %config(noreplace) %{_sysconfdir}/sysconfig/xenconsoled %config(noreplace) %{_sysconfdir}/sysconfig/blktapctrl @@ -536,8 +550,9 @@ rm -rf %{buildroot} %doc licensedir/* %changelog -* Wed Sep 21 2011 Michael Young +* Mon Sep 26 2011 Michael Young - lsb header fixes - xenconsoled shutdown needs xenstored to be running +- partial migration to systemd to fix shutdown * Sun Aug 14 2011 Michael Young - 4.1.1-3 - untrusted guest controlling PCI[E] device can lock up host CPU [CVE-2011-3131] diff --git a/xenstored.service b/xenstored.service new file mode 100644 index 0000000..93256b3 --- /dev/null +++ b/xenstored.service @@ -0,0 +1,15 @@ +[Unit] +Description=Xenstored - daemon managing xenstore file system +Requires=proc-xen.mount var-lib-xenstored.mount +After=proc-xen.mount var-lib-xenstored.mount +Before=libvirtd.service libvirt-guests.service + +[Service] +Type=forking +Environment=XENSTORED_ARGS= +EnvironmentFile=-/etc/sysconfig/xenstored +PIDFile=/var/run/xenstored.pid +ExecStart=/usr/sbin/xenstored --pid-file /var/run/xenstored.pid $XENSTORED_ARGS + +[Install] +WantedBy=multi-user.target