From b4c364b8e98295129ed7cbd25e32a95d7d4f05fb Mon Sep 17 00:00:00 2001 From: Juan RP Date: Sun, 9 Oct 2011 17:11:25 +0200 Subject: [PATCH] systemd-units: added a couple of units. --- srcpkgs/systemd-units/files/acpid.service | 17 +++++++++++++++++ srcpkgs/systemd-units/files/bluetooth.service | 12 ++++++++++++ srcpkgs/systemd-units/files/dcron.service | 9 +++++++++ srcpkgs/systemd-units/files/dhcpcd.service | 10 ++++++++++ srcpkgs/systemd-units/files/gdm.service | 10 ++++++++++ srcpkgs/systemd-units/files/ntpd.service | 11 +++++++++++ srcpkgs/systemd-units/files/polkitd.service | 16 ++++++++++++++++ .../files/service/NetworkManager.service | 14 -------------- srcpkgs/systemd-units/files/sshd.service | 15 +++++++++++++++ srcpkgs/systemd-units/files/udisks.service | 12 ++++++++++++ srcpkgs/systemd-units/files/upowerd.service | 11 +++++++++++ .../systemd-units/files/wpa_supplicant.service | 11 +++++++++++ srcpkgs/systemd-units/template | 15 +++++++-------- 13 files changed, 141 insertions(+), 22 deletions(-) create mode 100644 srcpkgs/systemd-units/files/acpid.service create mode 100644 srcpkgs/systemd-units/files/bluetooth.service create mode 100644 srcpkgs/systemd-units/files/dcron.service create mode 100644 srcpkgs/systemd-units/files/dhcpcd.service create mode 100644 srcpkgs/systemd-units/files/gdm.service create mode 100644 srcpkgs/systemd-units/files/ntpd.service create mode 100644 srcpkgs/systemd-units/files/polkitd.service delete mode 100644 srcpkgs/systemd-units/files/service/NetworkManager.service create mode 100644 srcpkgs/systemd-units/files/sshd.service create mode 100644 srcpkgs/systemd-units/files/udisks.service create mode 100644 srcpkgs/systemd-units/files/upowerd.service create mode 100644 srcpkgs/systemd-units/files/wpa_supplicant.service diff --git a/srcpkgs/systemd-units/files/acpid.service b/srcpkgs/systemd-units/files/acpid.service new file mode 100644 index 00000000000..937e8fd3ddc --- /dev/null +++ b/srcpkgs/systemd-units/files/acpid.service @@ -0,0 +1,17 @@ +[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] +Type=forking +ExecStart=/usr/sbin/acpid + +[Install] +WantedBy=multi-user.target diff --git a/srcpkgs/systemd-units/files/bluetooth.service b/srcpkgs/systemd-units/files/bluetooth.service new file mode 100644 index 00000000000..b9898a8c3bb --- /dev/null +++ b/srcpkgs/systemd-units/files/bluetooth.service @@ -0,0 +1,12 @@ +[Unit] +Description=Bluetooth Manager +After=syslog.target + +[Service] +Type=dbus +BusName=org.bluez +ExecStart=/usr/sbin/bluetoothd -n +StandardOutput=syslog + +[Install] +WantedBy=bluetooth.target diff --git a/srcpkgs/systemd-units/files/dcron.service b/srcpkgs/systemd-units/files/dcron.service new file mode 100644 index 00000000000..4ef1dd171ac --- /dev/null +++ b/srcpkgs/systemd-units/files/dcron.service @@ -0,0 +1,9 @@ +[Unit] +Description=Periodic Command Scheduler + +[Service] +EnvironmentFile=/etc/conf.d/crond +ExecStart=/usr/sbin/crond -f $CROND_ARGS + +[Install] +WantedBy=multi-user.target diff --git a/srcpkgs/systemd-units/files/dhcpcd.service b/srcpkgs/systemd-units/files/dhcpcd.service new file mode 100644 index 00000000000..2ac9adca069 --- /dev/null +++ b/srcpkgs/systemd-units/files/dhcpcd.service @@ -0,0 +1,10 @@ +[Unit] +Description=Lightweight DHCP client daemon +Wants=network.target +Before=network.target + +[Service] +ExecStart=/sbin/dhcpcd -q --nobackground + +[Install] +WantedBy=multi-user.target diff --git a/srcpkgs/systemd-units/files/gdm.service b/srcpkgs/systemd-units/files/gdm.service new file mode 100644 index 00000000000..d67919fa3fb --- /dev/null +++ b/srcpkgs/systemd-units/files/gdm.service @@ -0,0 +1,10 @@ +[Unit] +Description=Gnome Display Manager +Requires=dev-tty7.device +After=dev-tty7.device systemd-user-sessions.service + +[Service] +ExecStart=/usr/sbin/gdm -nodaemon + +[Install] +WantedBy=graphical.target diff --git a/srcpkgs/systemd-units/files/ntpd.service b/srcpkgs/systemd-units/files/ntpd.service new file mode 100644 index 00000000000..1905213ffce --- /dev/null +++ b/srcpkgs/systemd-units/files/ntpd.service @@ -0,0 +1,11 @@ +[Unit] +Description=Network Time Service +After=syslog.target + +[Service] +User=ntpd +ExecStartPre=ln -sf /var/chroot/ntpd/var/db/ntpd.drift /var/db/ntpd.drift +ExecStart=/usr/bin/ntpd -f /var/db/ntpd.drift -u ntpd:ntpd -i /var/chroot/ntpd -n + +[Install] +WantedBy=multi-user.target diff --git a/srcpkgs/systemd-units/files/polkitd.service b/srcpkgs/systemd-units/files/polkitd.service new file mode 100644 index 00000000000..3614de122bc --- /dev/null +++ b/srcpkgs/systemd-units/files/polkitd.service @@ -0,0 +1,16 @@ +[Unit] +Description=Policy Manager +After=syslog.target + +[Service] +Type=dbus +BusName=org.freedesktop.PolicyKit1 +ExecStart=/usr/libexec/polkitd +StandardOutput=syslog + +[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=graphical.target diff --git a/srcpkgs/systemd-units/files/service/NetworkManager.service b/srcpkgs/systemd-units/files/service/NetworkManager.service deleted file mode 100644 index 4c12480b134..00000000000 --- a/srcpkgs/systemd-units/files/service/NetworkManager.service +++ /dev/null @@ -1,14 +0,0 @@ -[Unit] -Description=Network Manager -After=syslog.target -Wants=network.target -Before=network.target - -[Service] -Type=dbus -BusName=org.freedesktop.NetworkManager -ExecStart=/usr/sbin/NetworkManager --no-daemon - -[Install] -WantedBy=multi-user.target -Alias=dbus-org.freedesktop.NetworkManager.service diff --git a/srcpkgs/systemd-units/files/sshd.service b/srcpkgs/systemd-units/files/sshd.service new file mode 100644 index 00000000000..fa3d3f278b0 --- /dev/null +++ b/srcpkgs/systemd-units/files/sshd.service @@ -0,0 +1,15 @@ +[Unit] +Description=SSH Secure Shell Service +After=syslog.target + +[Service] +ExecStart=/usr/sbin/sshd -D + +[Install] +WantedBy=multi-user.target + +# Note that this is the service file for running a single SSH server for all +# incoming connections, suitable only for systems with a large amount of SSH +# traffic. In almost all other cases it is a better idea to use sshd.socket + +# sshd@.service (i.e. the on-demand spawning version for one instance per +# connection). diff --git a/srcpkgs/systemd-units/files/udisks.service b/srcpkgs/systemd-units/files/udisks.service new file mode 100644 index 00000000000..9ff28b8f596 --- /dev/null +++ b/srcpkgs/systemd-units/files/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/srcpkgs/systemd-units/files/upowerd.service b/srcpkgs/systemd-units/files/upowerd.service new file mode 100644 index 00000000000..bee3792a62f --- /dev/null +++ b/srcpkgs/systemd-units/files/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 diff --git a/srcpkgs/systemd-units/files/wpa_supplicant.service b/srcpkgs/systemd-units/files/wpa_supplicant.service new file mode 100644 index 00000000000..3a11537e207 --- /dev/null +++ b/srcpkgs/systemd-units/files/wpa_supplicant.service @@ -0,0 +1,11 @@ +[Unit] +Description=Wi-Fi Security Service +After=syslog.target + +[Service] +Type=dbus +BusName=fi.epitest.hostap.WPASupplicant +ExecStart=/usr/sbin/wpa_supplicant -c /etc/wpa_supplicant/wpa_supplicant.conf -u +StandardOutput=syslog + +# Hmm, a WantedBy=multi-user.target probably makes sense here. diff --git a/srcpkgs/systemd-units/template b/srcpkgs/systemd-units/template index e34af3b71d8..f7d1d4368dc 100644 --- a/srcpkgs/systemd-units/template +++ b/srcpkgs/systemd-units/template @@ -1,19 +1,18 @@ # Template file for 'systemd-units' pkgname=systemd-units -version=0.0.1 +version=0.2 build_style=custom-install -short_desc="Vanilla GNU/Linux systemd units" -maintainer="Mike Rossset" -homepage="https://github.com/xtraeme/vanilla" -checksum=b31983b27630b3ef99f68bd8382851a7963542c944b625bdbfd2f2ff301a02d3 +short_desc="Void GNU/Linux systemd units" +maintainer="Juan RP " +homepage="http://code.google.com/p/xbps" long_desc=" - $pkgname cantains systemd units for vanilla gnu/linux services" + $pkgname contains systemd units for a couple of Void GNU/Linux services." noextract=yes noarch=yes do_install() { - mkdir -p $DESTDIR/lib/systemd/system - install -D -m644 ${FILESDIR}/service/*.service ${DESTDIR}/lib/systemd/system/ + vmkdir lib/systemd/system + install -m644 ${FILESDIR}/*.service ${DESTDIR}/lib/systemd/system }