summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Widawsky2015-12-24 10:02:06 -0800
committerBen Widawsky2015-12-24 11:25:32 -0800
commit083f39fdb08b4070d22a7e6d5a466767a977ad84 (patch)
tree0b1a39d0720118ff6d307cadf707e78a231633a1
parent5e8f7eebc937c2ee9a560ab08060a419c5206011 (diff)
downloadaur-083f39fdb08b4070d22a7e6d5a466767a977ad84.tar.gz
Merge Fedora Core's systemd files to ours
I assume Fedora team knows what they're doing with regard to systemd. All other changes will come directly from the upstream package. This doesn't pull in the wrappers used by Fedora. Note that this diverges from SuSE's explicit daemonizing, and instead relying on systemd, thus the removal of -d
-rw-r--r--icecream-scheduler.service10
-rw-r--r--icecream-schedulerd17
-rw-r--r--icecream.service13
-rw-r--r--icecreamd2
4 files changed, 25 insertions, 17 deletions
diff --git a/icecream-scheduler.service b/icecream-scheduler.service
index eda4c204ac95..8aa12adcb848 100644
--- a/icecream-scheduler.service
+++ b/icecream-scheduler.service
@@ -1,10 +1,12 @@
[Unit]
-Description=icecream scheduler
-Wants=network.target
+Description=Icecream distributed compiler scheduler
[Service]
-Type=forking
+Type=simple
+User=icecream
+Group=icecream
+SyslogIdentifier=icecc-scheduler
ExecStart=/usr/lib/icecream/icecream-schedulerd
[Install]
-Alias=multi-user.target.wants/icecream-scheduler.service
+WantedBy=multi-user.target
diff --git a/icecream-schedulerd b/icecream-schedulerd
index 6e28204f45d0..10bc0ed71097 100644
--- a/icecream-schedulerd
+++ b/icecream-schedulerd
@@ -1,15 +1,16 @@
-#!/bin/bash
+#!/bin/sh
+
. /etc/icecream.conf
netname=
-if test -n "${ICECREAM_NETNAME}"; then
- netname="-n ${ICECREAM_NETNAME}"
+if test -n "$ICECREAM_NETNAME"; then
+ netname="-n $ICECREAM_NETNAME"
fi
logfile=""
-if test -n "${ICECREAM_LOG_FILE}"; then
- touch ${ICECREAM_LOG_FILE}
- chown icecc:icecc ${ICECREAM_LOG_FILE}
- logfile="-l ${ICECREAM_LOG_FILE}"
+if test -n "$ICECREAM_LOG_FILE"; then
+ touch $ICECREAM_LOG_FILE
+ chown icecream:icecream $ICECREAM_LOG_FILE
+ logfile="-l $ICECREAM_LOG_FILE"
fi
-/usr/lib/icecream/sbin/icecc-scheduler -d ${netname} ${logfile} &>/dev/null
+/usr/lib/icecream/sbin/icecc-scheduler -u icecream ${netname} ${logfile} &>/dev/null
diff --git a/icecream.service b/icecream.service
index b5e464f0c4f9..52ad5fcb15ef 100644
--- a/icecream.service
+++ b/icecream.service
@@ -1,10 +1,15 @@
[Unit]
-Description=icecream worker
-Wants=network.target
+Description=Icecream Distributed Compiler
+After=network.target nss-lookup.target
[Service]
-Type=forking
+Type=simple
+# Set SHELL so that icecc-create-env does not have to attempt to detect its
+# value by reading /etc/passwd. The SELinux policy does not need to allow it.
+Environment=SHELL=/bin/bash
+SyslogIdentifier=iceccd
ExecStart=/usr/lib/icecream/icecreamd
+Nice=5
[Install]
-Alias=multi-user.target.wants/icecream.service
+WantedBy=multi-user.target
diff --git a/icecreamd b/icecreamd
index 8659713f03d3..f0ca66f1960d 100644
--- a/icecreamd
+++ b/icecreamd
@@ -32,4 +32,4 @@ if test -n "${ICECREAM_MAX_JOBS}"; then
fi
fi
-/usr/lib/icecream/sbin/iceccd -d ${logfile} ${nice} ${scheduler} ${netname} -b "${ICECREAM_BASEDIR}" ${maxjobs} ${noremote} &>/dev/null
+/usr/lib/icecream/sbin/iceccd -u icecream ${logfile} ${nice} ${scheduler} ${netname} -b "${ICECREAM_BASEDIR}" ${maxjobs} ${noremote} &>/dev/null