summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuo Jinghua <sunmoon1997@gmail.com>2010-10-21 20:54:47 +0800
committerLuo Jinghua <sunmoon1997@gmail.com>2010-10-21 20:54:47 +0800
commit023adadaa5c5c98f6502ed91d7c827fd159df656 (patch)
treee4544bc1e61d1ede667046720545de1e35b3e1ab
Initial commit
-rw-r--r--NetworkManager.service15
-rw-r--r--acpid.service16
-rw-r--r--alsasound.service10
-rw-r--r--avahi-dnsconfd.service30
-rw-r--r--cpufrequtils.service15
-rw-r--r--cups.path8
-rw-r--r--cups.service23
-rw-r--r--cups.socket9
-rw-r--r--dmesg.service17
-rw-r--r--gpm.service14
-rw-r--r--hald.service15
-rw-r--r--lvm-monitoring.service14
-rw-r--r--lvm.service14
-rw-r--r--modem-manager.service11
-rw-r--r--nfs.service18
-rw-r--r--nmbd.service11
-rw-r--r--ntpd.service9
-rw-r--r--openrc-init.service35
-rw-r--r--policykit-daemon.service15
-rw-r--r--pommed.service9
-rw-r--r--portreserve.service12
-rw-r--r--rpcbind.service9
-rw-r--r--rpcbind.socket13
-rw-r--r--smbd.service11
-rw-r--r--sshd.service11
-rw-r--r--udisks.service12
-rw-r--r--upowerd.service11
27 files changed, 387 insertions, 0 deletions
diff --git a/NetworkManager.service b/NetworkManager.service
new file mode 100644
index 0000000..a6ce7f4
--- /dev/null
+++ b/NetworkManager.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=Network Manager
+After=syslog.target
+
+[Service]
+Type=dbus
+BusName=org.freedesktop.NetworkManager
+ExecStart=/usr/sbin/NetworkManager --no-daemon
+
+[Install]
+# We pull this in by graphical.target instead of waiting for the bus
+# activation, to speed things up a little: gdm uses this anyway so it is nice
+# if it is already around when gdm wants to use it and doesn't have to wait for
+# it.
+WantedBy=multi-user.target
diff --git a/acpid.service b/acpid.service
new file mode 100644
index 0000000..17e1304
--- /dev/null
+++ b/acpid.service
@@ -0,0 +1,16 @@
+[Unit]
+Description=ACPI Event Daemon
+After=syslog.target
+
+# This could probably benefit from socket activation, but honestly I think it
+# is time for acpid to go away, and hence I am not planning to spend the time
+# to add socket activation here. We use Type=forking to ensure that the
+# communication sockets are in place before boot proceeds with any service
+# needing this service. Would acpid support socket activation we could use
+# Type=simple here.
+
+[Service]
+ExecStart=/usr/sbin/acpid -f
+
+[Install]
+WantedBy=multi-user.target
diff --git a/alsasound.service b/alsasound.service
new file mode 100644
index 0000000..9de81aa
--- /dev/null
+++ b/alsasound.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=Advanced Linux Sound Architecture
+
+[Service]
+RemainAfterExit=yes
+ExecStart=/etc/init.d/alsasound start
+ExecStop=/etc/init.d/alsasound stop
+
+[Install]
+WantedBy=multi-user.target
diff --git a/avahi-dnsconfd.service b/avahi-dnsconfd.service
new file mode 100644
index 0000000..4b77ea3
--- /dev/null
+++ b/avahi-dnsconfd.service
@@ -0,0 +1,30 @@
+# This file is part of avahi.
+#
+# avahi 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 of the
+# License, or (at your option) any later version.
+#
+# avahi 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 General Public
+# License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with avahi; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+# USA.
+
+[Unit]
+Description=Avahi DNS Configuration Daemon
+Requires=avahi-daemon.socket avahi-daemon.service
+After=syslog.target avahi-daemon.socket
+
+[Service]
+Type=simple
+ExecStart=/usr/sbin/avahi-dnsconfd -s
+ExecReload=/usr/sbin/avahi-dnsconfd -r
+
+[Install]
+WantedBy=multi-user.target
+Also=avahi-daemon.socket
diff --git a/cpufrequtils.service b/cpufrequtils.service
new file mode 100644
index 0000000..0f66f7f
--- /dev/null
+++ b/cpufrequtils.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=CPU freq utils
+DefaultDependencies=no
+Conflicts=shutdown.target
+Before=shutdown.target
+After=local-fs.target
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+ExecStart=/etc/init.d/cpufrequtils start
+ExecStop=/etc/init.d/cpufrequtils stop
+
+[Install]
+WantedBy=sysinit.target
diff --git a/cups.path b/cups.path
new file mode 100644
index 0000000..5eed5e5
--- /dev/null
+++ b/cups.path
@@ -0,0 +1,8 @@
+[Unit]
+Description=CUPS Printer Service Spool
+
+[Path]
+DirectoryNotEmpty=/var/spool/cups
+
+[Install]
+WantedBy=multi-user.target
diff --git a/cups.service b/cups.service
new file mode 100644
index 0000000..a3ca787
--- /dev/null
+++ b/cups.service
@@ -0,0 +1,23 @@
+[Unit]
+Description=CUPS Printing Service
+Wants=portreserve.service
+After=portreserve.service
+
+[Service]
+ExecStartPre=/sbin/portrelease cups
+ExecStart=/usr/sbin/cupsd -f
+
+# This is evil stuff. CUPS should use proper enumeration instead of
+# retriggering these devices. CUPS folks, please fix this, otherwise Kay will
+# come after you!
+ExecStartPost=/sbin/udevadm trigger --subsystem-match=usb --attr-match=bInterfaceClass=07 --attr-match=bInterfaceSubClass=01
+ExecStartPost=/sbin/udevadm trigger --subsystem-match=usb --property-match=DEVNAME=/dev/usb/lp*
+
+[Install]
+# This is activated via any of these three triggers:
+# 1. Somebody connects to its sockets
+# 2. A file is in the spool directory
+# 3. A printer is plugged in
+# This follows the same scheme MacOS uses to spawn CUPS only when necessary
+Also=cups.socket cups.path
+WantedBy=printer.target
diff --git a/cups.socket b/cups.socket
new file mode 100644
index 0000000..d56bb93
--- /dev/null
+++ b/cups.socket
@@ -0,0 +1,9 @@
+[Unit]
+Description=CUPS Printing Service Sockets
+
+[Socket]
+ListenStream=/var/run/cups/cups.sock
+ListenStream=631
+
+[Install]
+WantedBy=sockets.target
diff --git a/dmesg.service b/dmesg.service
new file mode 100644
index 0000000..ceae34b
--- /dev/null
+++ b/dmesg.service
@@ -0,0 +1,17 @@
+# 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=Set Dmesg Level for a Cleaner Boot
+DefaultDependencies=no
+Before=basic.target syslog.target syslog-ng.service
+
+[Service]
+Type=oneshot
+RemainAfterExit=no
+ExecStart=/bin/dmesg -n1
+
diff --git a/gpm.service b/gpm.service
new file mode 100644
index 0000000..86d9315
--- /dev/null
+++ b/gpm.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=Console Mouse manager
+After=syslog.target
+
+# This could probably benefit from socket activation, but honestly I think it
+# is time for gpm to go away, and hence I am not planning to spend the time
+# to add socket activation here.
+
+[Service]
+ExecStart=/usr/sbin/gpm -m /dev/input/mice -t exps2 -D
+#StandardOutput=syslog
+
+[Install]
+WantedBy=multi-user.target
diff --git a/hald.service b/hald.service
new file mode 100644
index 0000000..d8370d1
--- /dev/null
+++ b/hald.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=Hardware Abstraction Layer Daemon
+After=syslog.target
+
+[Service]
+Type=dbus
+BusName=org.freedesktop.Hal
+ExecStart=/usr/sbin/hald --use-syslog --daemon=no
+
+[Install]
+# We pull this in by graphical.target instead of waiting for the bus
+# activation, to speed things up a little: gdm uses this anyway so it is nice
+# if it is already around when gdm wants to use it and doesn't have to wait for
+# it.
+WantedBy=multi-user.target
diff --git a/lvm-monitoring.service b/lvm-monitoring.service
new file mode 100644
index 0000000..a4afc52
--- /dev/null
+++ b/lvm-monitoring.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=Linux Volume Manager Monitoring Daemon
+DefaultDependencies=no
+Before=shutdown.target local-fs.target
+After=lvm.service
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+ExecStart=/etc/init.d/lvm-monitoring start
+ExecStop=/etc/init.d/lvm-monitoring stop
+
+[Install]
+WantedBy=local-fs.target
diff --git a/lvm.service b/lvm.service
new file mode 100644
index 0000000..a2950b7
--- /dev/null
+++ b/lvm.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=Linux Volume Manager
+DefaultDependencies=no
+Before=shutdown.target fsck.target local-fs.target
+After=openrc-init.service
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+ExecStart=/etc/init.d/lvm start
+ExecStop=/etc/init.d/lvm stop
+
+[Install]
+WantedBy=local-fs.target
diff --git a/modem-manager.service b/modem-manager.service
new file mode 100644
index 0000000..12f518b
--- /dev/null
+++ b/modem-manager.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Modem Manager
+After=syslog.target
+
+[Service]
+Type=dbus
+BusName=org.freedesktop.ModemManager
+ExecStart=/usr/sbin/modem-manager
+
+[Install]
+WantedBy=multi-user.target
diff --git a/nfs.service b/nfs.service
new file mode 100644
index 0000000..a9d9e65
--- /dev/null
+++ b/nfs.service
@@ -0,0 +1,18 @@
+[Unit]
+Description=SSH Daemon
+After=syslog.target networking.target
+
+# This could probably benefit from socket activation, but honestly I think it
+# is time for acpid to go away, and hence I am not planning to spend the time
+# to add socket activation here. We use Type=forking to ensure that the
+# communication sockets are in place before boot proceeds with any service
+# needing this service. Would acpid support socket activation we could use
+# Type=simple here.
+
+[Service]
+Type=forking
+ExecStart=/etc/init.d/nfs start
+ExecStop=/usr/init.d/nfs stop
+
+[Install]
+WantedBy=multi-user.target
diff --git a/nmbd.service b/nmbd.service
new file mode 100644
index 0000000..cce9fd5
--- /dev/null
+++ b/nmbd.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Samba Daemon
+After=syslog.target
+Requires=smbd.service
+
+[Service]
+ExecStartPre=-/bin/mkdir /var/run/samba
+ExecStart=/usr/sbin/nmbd -F
+
+[Install]
+WantedBy=multi-user.target
diff --git a/ntpd.service b/ntpd.service
new file mode 100644
index 0000000..6c4cef5
--- /dev/null
+++ b/ntpd.service
@@ -0,0 +1,9 @@
+[Unit]
+Description=Network Time Service
+After=syslog.target
+
+[Service]
+ExecStart=/usr/sbin/ntpd -n
+
+[Install]
+WantedBy=multi-user.target
diff --git a/openrc-init.service b/openrc-init.service
new file mode 100644
index 0000000..642b7f3
--- /dev/null
+++ b/openrc-init.service
@@ -0,0 +1,35 @@
+# 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=Init OpenRC
+DefaultDependencies=no
+Before=local-fs.target
+
+[Service]
+Type=oneshot
+RemainAfterExit=no
+Environment=RC_LIBEXECDIR=/lib/rc
+ExecStart=/lib/rc/sh/init.sh
+ExecStartPost=-/bin/mkdir -p /lib/rc/init.d/start
+ExecStartPost=-/bin/mkdir -p /lib/rc/init.d/starting
+ExecStartPost=-/bin/mkdir -p /lib/rc/init.d/started
+ExecStartPost=-/bin/mkdir -p /lib/rc/init.d/stop
+ExecStartPost=-/bin/mkdir -p /lib/rc/init.d/stopping
+ExecStartPost=-/bin/mkdir -p /lib/rc/init.d/options
+ExecStartPost=-/bin/mkdir -p /lib/rc/init.d/daemons
+ExecStartPost=-/bin/mkdir -p /lib/rc/init.d/tmp
+ExecStartPost=-/bin/mkdir -p /lib/rc/init.d/failed
+ExecStartPost=-/bin/mkdir -p /lib/rc/init.d/inactive
+ExecStartPost=-/bin/mkdir -p /lib/rc/init.d/wasinactive
+ExecStartPost=-/bin/mkdir -p /lib/rc/init.d/exclusive
+ExecStartPost=-/bin/mkdir -p /lib/rc/init.d/hotplugged
+ExecStartPost=-/bin/mkdir -p /lib/rc/init.d/scheduled
+ExecStartPost=-/bin/ln -s /etc/init.d/localmount /lib/rc/init.d/started
+ExecStartPost=-/bin/ln -s /etc/init.d/fsck /lib/rc/init.d/started
+ExecStartPost=-/bin/ln -s /etc/init.d/udev /lib/rc/init.d/started
+
diff --git a/policykit-daemon.service b/policykit-daemon.service
new file mode 100644
index 0000000..f30970c
--- /dev/null
+++ b/policykit-daemon.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=PolicyKit
+After=syslog.target
+
+[Service]
+Type=dbus
+BusName=org.freedesktop.PolicyKit
+ExecStart=/usr/libexec/polkitd --no-exit
+
+[Install]
+# We pull this in by graphical.target instead of waiting for the bus
+# activation, to speed things up a little: gdm uses this anyway so it is nice
+# if it is already around when gdm wants to use it and doesn't have to wait for
+# it.
+WantedBy=multi-user.target
diff --git a/pommed.service b/pommed.service
new file mode 100644
index 0000000..54eea9a
--- /dev/null
+++ b/pommed.service
@@ -0,0 +1,9 @@
+[Unit]
+Description=Pommed
+After=syslog.target alsasound.service
+
+[Service]
+ExecStart=/usr/bin/pommed -f
+
+[Install]
+WantedBy=multi-user.target
diff --git a/portreserve.service b/portreserve.service
new file mode 100644
index 0000000..acf7ff6
--- /dev/null
+++ b/portreserve.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Port Reservation Service
+Before=rpcbind.service
+
+# We probably list all those units here which make steal the port away from us
+# in a Before= line
+
+[Service]
+ExecStart=/sbin/portreserve
+
+# We define no install section here. This service should be pulled in via
+# Requires= from the respective services.
diff --git a/rpcbind.service b/rpcbind.service
new file mode 100644
index 0000000..a944a1c
--- /dev/null
+++ b/rpcbind.service
@@ -0,0 +1,9 @@
+[Unit]
+Description=RPC Portmapper Service
+After=syslog.target
+
+[Service]
+ExecStart=/sbin/rpcbind -f
+
+[Install]
+Also=rpcbind.socket
diff --git a/rpcbind.socket b/rpcbind.socket
new file mode 100644
index 0000000..5b516ac
--- /dev/null
+++ b/rpcbind.socket
@@ -0,0 +1,13 @@
+[Unit]
+Description=RPC Portmapper Socket
+
+[Socket]
+ListenStream=/var/run/rpcbind.sock
+ListenStream=[::]:111
+ListenDatagram=[::]:111
+ListenStream=0.0.0.0:111
+ListenDatagram=0.0.0.0:111
+BindIPv6Only=yes
+
+[Install]
+WantedBy=sockets.target
diff --git a/smbd.service b/smbd.service
new file mode 100644
index 0000000..1eea2ec
--- /dev/null
+++ b/smbd.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Samba Daemon
+After=syslog.target
+Requires=cups.service
+
+[Service]
+ExecStartPre=-/bin/mkdir /var/run/samba
+ExecStart=/usr/sbin/smbd -F
+
+[Install]
+WantedBy=multi-user.target
diff --git a/sshd.service b/sshd.service
new file mode 100644
index 0000000..d9fa931
--- /dev/null
+++ b/sshd.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=SSH Daemon
+After=syslog.target
+
+[Service]
+Type=forking
+ExecStart=/etc/init.d/sshd start
+ExecStop=/usr/init.d/sshd stop
+
+[Install]
+WantedBy=multi-user.target
diff --git a/udisks.service b/udisks.service
new file mode 100644
index 0000000..9ff28b8
--- /dev/null
+++ b/udisks.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Disk Manager
+After=syslog.target
+
+[Service]
+Type=dbus
+BusName=org.freedesktop.UDisks
+ExecStart=/usr/libexec/udisks-daemon
+StandardOutput=syslog
+
+[Install]
+WantedBy=graphical.target
diff --git a/upowerd.service b/upowerd.service
new file mode 100644
index 0000000..bee3792
--- /dev/null
+++ b/upowerd.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Power Manager
+After=syslog.target
+
+[Service]
+Type=dbus
+BusName=org.freedesktop.UPower
+ExecStart=/usr/libexec/upowerd
+
+[Install]
+WantedBy=graphical.target