From a97c2b994fb26ac6b939d8db0abbf6901e49c14b Mon Sep 17 00:00:00 2001 From: Chris Lumens Date: Thu, 10 Feb 2011 14:13:32 -0500 Subject: Add the unit files necessary to have systemd start loader. --- data/Makefile.am | 2 +- data/systemd/Makefile.am | 32 ++++++++++++++++++++++++++++++++ data/systemd/anaconda-shell.service | 12 ++++++++++++ data/systemd/anaconda.target | 2 ++ data/systemd/loader.service | 13 +++++++++++++ 5 files changed, 60 insertions(+), 1 deletion(-) create mode 100644 data/systemd/Makefile.am create mode 100644 data/systemd/anaconda-shell.service create mode 100644 data/systemd/anaconda.target create mode 100644 data/systemd/loader.service (limited to 'data') diff --git a/data/Makefile.am b/data/Makefile.am index c9fbc601b..7c1f9ae26 100644 --- a/data/Makefile.am +++ b/data/Makefile.am @@ -17,7 +17,7 @@ # # Author: Martin Sivak -SUBDIRS = bootdisk command-stubs fonts icons liveinst pixmaps ui +SUBDIRS = bootdisk command-stubs fonts icons liveinst pixmaps systemd ui EXTRA_DIST = lang-table CLEANFILES = *~ lang-names diff --git a/data/systemd/Makefile.am b/data/systemd/Makefile.am new file mode 100644 index 000000000..4185ddbd5 --- /dev/null +++ b/data/systemd/Makefile.am @@ -0,0 +1,32 @@ +# systemd/Makefile.am for anaconda +# +# Copyright (C) 2011 Red Hat, Inc. +# +# This program 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. +# +# 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 Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this program. If not, see . +# +# Author: Chris Lumens + +systemddir = /lib/systemd/system +dist_systemd_DATA = anaconda-shell.service anaconda.target loader.service + +MAINTAINERCLEANFILES = Makefile.in + +install-exec-local: + mkdir -p $(DESTDIR)/lib/systemd/system/anaconda.target.wants + ln -sf /lib/systemd/system/anaconda-shell.service $(DESTDIR)/lib/systemd/system/anaconda.target.wants + ln -sf /lib/systemd/system/dbus.target $(DESTDIR)/lib/systemd/system/anaconda.target.wants + ln -sf /lib/systemd/system/loader.service $(DESTDIR)/lib/systemd/system/anaconda.target.wants + ln -sf /lib/systemd/system/sockets.target $(DESTDIR)/lib/systemd/system/anaconda.target.wants + ln -sf /lib/systemd/system/udev.service $(DESTDIR)/lib/systemd/system/anaconda.target.wants + ln -sf /lib/systemd/system/udev-settle.service $(DESTDIR)/lib/systemd/system/anaconda.target.wants diff --git a/data/systemd/anaconda-shell.service b/data/systemd/anaconda-shell.service new file mode 100644 index 000000000..556ed68fa --- /dev/null +++ b/data/systemd/anaconda-shell.service @@ -0,0 +1,12 @@ +[Unit] +Description=Shell on tty2 +BindTo=dev-tty2.device +After=dev-tty2.device + +[Service] +Environment=TERM=linux +ExecStart=-/sbin/agetty -n tty2 38400 +Restart=always +RestartSec=0 +TimeoutSec=0 +KillMode=process-group diff --git a/data/systemd/anaconda.target b/data/systemd/anaconda.target new file mode 100644 index 000000000..bcbfb8e24 --- /dev/null +++ b/data/systemd/anaconda.target @@ -0,0 +1,2 @@ +[Unit] +Description=The anaconda installation program diff --git a/data/systemd/loader.service b/data/systemd/loader.service new file mode 100644 index 000000000..3b6b726ea --- /dev/null +++ b/data/systemd/loader.service @@ -0,0 +1,13 @@ +[Unit] +Description=The anaconda loader +Requires=dbus.service udev.service rsyslog.service +After=dbus.service udev.service rsyslog.service + +[Service] +Environment=HOME=/ +Type=oneshot +WorkingDirectory=/ +ExecStart=/sbin/loader +StandardInput=tty-force +KillMode=process-group +TimeoutSec=0 -- cgit