diff options
author | Tom Gundersen <teg@jklm.no> | 2010-06-16 13:50:55 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2010-06-16 23:13:10 +0200 |
commit | 1ebdf2d8793181f31b766b8342391aa1978f9917 (patch) | |
tree | b3e776d73eca8cc587d540b36db7a9cb909d3b65 | |
parent | 812cce323db081634f37e4ec6d29f2b9328a3f52 (diff) |
units: make Arch boot
This patch gives minimal Arch support (enough to boot).
We still need to parse the services to start from /etc/rc.conf before systemd can be a drop-in replacement on Arch.
-rw-r--r-- | Makefile.am | 9 | ||||
-rw-r--r-- | units/arch/halt.service | 18 | ||||
-rw-r--r-- | units/arch/poweroff.service | 18 | ||||
-rw-r--r-- | units/arch/rc-local.service | 20 | ||||
-rw-r--r-- | units/arch/reboot.service | 18 | ||||
-rw-r--r-- | units/arch/sysinit.service | 19 | ||||
-rw-r--r-- | units/getty@.service.m4 | 1 | ||||
-rw-r--r-- | units/sysinit.target.m4 | 5 |
8 files changed, 108 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am index b887d2621c..3e77a4737b 100644 --- a/Makefile.am +++ b/Makefile.am @@ -185,6 +185,15 @@ dist_systemunit_DATA += \ units/gentoo/xdm.service endif +if TARGET_ARCH +dist_systemunit_DATA += \ + units/arch/sysinit.service \ + units/arch/rc-local.service \ + units/arch/halt.service \ + units/arch/poweroff.service \ + units/arch/reboot.service +endif + # This is needed because automake is buggy in how it generates the # rules for C programs, but not Vala programs. We therefore can't # list the .h files as dependencies if we want make dist to work. diff --git a/units/arch/halt.service b/units/arch/halt.service new file mode 100644 index 0000000000..445ca48d44 --- /dev/null +++ b/units/arch/halt.service @@ -0,0 +1,18 @@ +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. + +[Unit] +Description=Halt +Requires=shutdown.target +After=shutdown.target +Conflicts=dev-hugepages.automount dev-mqueue.automount proc-sys-fs-binfmt_misc.automount sys-kernel-debug.automount sys-kernel-security.automount + +[Service] +Type=finish +ValidNoProcess=yes +Environment=RUNLEVEL=0 +ExecStart=/etc/rc.shutdown diff --git a/units/arch/poweroff.service b/units/arch/poweroff.service new file mode 100644 index 0000000000..3ca8f30e94 --- /dev/null +++ b/units/arch/poweroff.service @@ -0,0 +1,18 @@ +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. + +[Unit] +Description=Power-Off +Requires=shutdown.target +After=shutdown.target +Conflicts=dev-hugepages.automount dev-mqueue.automount proc-sys-fs-binfmt_misc.automount sys-kernel-debug.automount sys-kernel-security.automount + +[Service] +Type=finish +ValidNoProcess=yes +Environment=RUNLEVEL=0 +ExecStart=/etc/rc.shutdown diff --git a/units/arch/rc-local.service b/units/arch/rc-local.service new file mode 100644 index 0000000000..45b6e16483 --- /dev/null +++ b/units/arch/rc-local.service @@ -0,0 +1,20 @@ +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. + +[Unit] +Description=/etc/rc.local Compatibility +Requires=basic.target +After=basic.target +Conflicts=shutdown.target +Before=getty@tty1.service + +[Service] +ExecStart=/etc/rc.local +ExectStop=/etc/rc.local.shutdown +TimeoutSec=0 +StandardInput=tty +ValidNoProcess=yes diff --git a/units/arch/reboot.service b/units/arch/reboot.service new file mode 100644 index 0000000000..4aa7dc2e81 --- /dev/null +++ b/units/arch/reboot.service @@ -0,0 +1,18 @@ +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. + +[Unit] +Description=Reboot +Requires=shutdown.target +After=shutdown.target +Conflicts=dev-hugepages.automount dev-mqueue.automount proc-sys-fs-binfmt_misc.automount sys-kernel-debug.automount sys-kernel-security.automount + +[Service] +Type=finish +ValidNoProcess=yes +Environment=RUNLEVEL=6 +ExecStart=/etc/rc.shutdown diff --git a/units/arch/sysinit.service b/units/arch/sysinit.service new file mode 100644 index 0000000000..8be50d784b --- /dev/null +++ b/units/arch/sysinit.service @@ -0,0 +1,19 @@ +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. + +[Unit] +Description=System Initialization +Before=local-fs.target remote-fs.target swap.target sockets.target +Conflicts=shutdown.target +Before=shutdown.target + +[Service] +ExecStart=/etc/rc.sysinit +Type=forking +TimeoutSec=0 +StandardInput=tty +ValidNoProcess=yes diff --git a/units/getty@.service.m4 b/units/getty@.service.m4 index 1ada4ffd01..8f3f628b54 100644 --- a/units/getty@.service.m4 +++ b/units/getty@.service.m4 @@ -9,6 +9,7 @@ m4_ifdef(`TARGET_FEDORA', `m4_define(`GETTY', `/sbin/mingetty')')m4_dnl m4_ifdef(`TARGET_SUSE', `m4_define(`GETTY', `/sbin/mingetty')')m4_dnl m4_ifdef(`TARGET_DEBIAN', `m4_define(`GETTY', `/sbin/getty 38400')')m4_dnl m4_ifdef(`TARGET_GENTOO', `m4_define(`GETTY', `/sbin/agetty 38400')')m4_dnl +m4_ifdef(`TARGET_ARCH', `m4_define(`GETTY', `/sbin/agetty -8 38400')')m4_dnl m4_dnl [Unit] Description=Getty on %I diff --git a/units/sysinit.target.m4 b/units/sysinit.target.m4 index 68c661ef02..48e55a4358 100644 --- a/units/sysinit.target.m4 +++ b/units/sysinit.target.m4 @@ -17,3 +17,8 @@ m4_dnl Hook in Fedora's /etc/rc.d/rc.sysinit Requires=sysinit.service After=sysinit.service )m4_dnl +m4_ifdef(`TARGET_ARCH', +m4_dnl Hook in Arch's /etc/rc.sysinit +Requires=sysinit.service +After=sysinit.service +)m4_dnl |