projects
/
grml-autoconfig.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
62f3f8f
)
Enable acpid.socket if we're running under systemd
author
Michael Prokop
<mika@grml.org>
Fri, 30 Dec 2016 22:36:05 +0000
(23:36 +0100)
committer
Michael Prokop
<mika@grml.org>
Fri, 30 Dec 2016 22:36:05 +0000
(23:36 +0100)
autoconfig.functions
patch
|
blob
|
history
diff --git
a/autoconfig.functions
b/autoconfig.functions
index
d518584
..
a019878
100755
(executable)
--- a/
autoconfig.functions
+++ b/
autoconfig.functions
@@
-23,6
+23,12
@@
umask 022
# Ignore these signals in non-interactive mode: INT, TERM, SEGV
[ -z "$PS1" ] && trap "" 2 3 11
# Ignore these signals in non-interactive mode: INT, TERM, SEGV
[ -z "$PS1" ] && trap "" 2 3 11
+if [[ "$(realpath "$(cat /proc/1/cmdline)")" == "/lib/systemd/systemd" ]] ; then
+ SYSTEMD=true
+else
+ SYSTEMD=false
+fi
+
# zsh stuff
iszsh(){
if [ -n "$ZSH_VERSION" ] ; then
# zsh stuff
iszsh(){
if [ -n "$ZSH_VERSION" ] ; then
@@
-703,6
+709,7
@@
else
fi
if ! pgrep acpid >/dev/null ; then
einfo "Starting acpi daemon."
fi
if ! pgrep acpid >/dev/null ; then
einfo "Starting acpi daemon."
+ $SYSTEMD && systemctl start acpid.socket
/etc/init.d/acpid start >>$DEBUG 2>&1 ; eend $?
else
ewarn "acpi daemon already running."
/etc/init.d/acpid start >>$DEBUG 2>&1 ; eend $?
else
ewarn "acpi daemon already running."