diff options
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | etc/conf.d/vdr | 6 | ||||
-rw-r--r-- | etc/systemd/system/vdr.service.d/00-gentoo-vdr-user.conf | 22 | ||||
-rw-r--r-- | usr/lib/systemd/system/vdr.service | 2 | ||||
-rw-r--r-- | usr/share/vdr/systemd/vdr-systemd_helper.sh | 19 | ||||
-rw-r--r-- | var/vdr/tmp/Makefile | 2 | ||||
-rw-r--r-- | var/vdr/tmp/plugins_skipped_ALL | 0 |
7 files changed, 29 insertions, 30 deletions
@@ -1,6 +1,14 @@ # ChangeLog for gentoo-vdr-scripts # $Id$ + 18 Oct 2014; Joerg Bornkessel <hd_brummy@gentoo.org> etc/conf.d/vdr, + etc/systemd/system/vdr.service.d/00-gentoo-vdr-user.conf, + usr/lib/systemd/system/vdr.service, + usr/share/vdr/systemd/vdr-systemd_helper.sh, var/vdr/tmp/Makefile, + -var/vdr/tmp/plugins_skipped_ALL: + reverted changes for vdrplugin-rebuild -s paramater; fixed systemd support + wrt bug 353492#33 ff, thx to L.Muresan + 01 Oct 2014; Joerg Bornkessel <hd_brummy@gentoo.org> var/vdr/tmp/Makefile, +var/vdr/tmp/plugins_skipped_ALL, vdrplugin-rebuild/vdrplugin-rebuild: added --keep-going to vdrplugin-rebuild; added empty file plugins_skipped_ALL diff --git a/etc/conf.d/vdr b/etc/conf.d/vdr index b3d76ba..ecfc9f9 100644 --- a/etc/conf.d/vdr +++ b/etc/conf.d/vdr @@ -225,6 +225,12 @@ PLUGIN_CHECK_PATCHLEVEL="yes" # and who want to start vdr as user root # allowed values: yes no # default: no +# +# WILL BE IGNORED IF USING SYSTEMD !!! +# Enable the 'User=root' key under the [Service] section in +# /etc/systemd/system/vdr.service.d/00-gentoo-vdr-user.conf +# only if you want to run vdr as user root and use systemd +# #START_VDR_AS_ROOT="no" # Use only the given DVB device (NUM = 0, 1, 2...) diff --git a/etc/systemd/system/vdr.service.d/00-gentoo-vdr-user.conf b/etc/systemd/system/vdr.service.d/00-gentoo-vdr-user.conf index 98384c2..0164aa4 100644 --- a/etc/systemd/system/vdr.service.d/00-gentoo-vdr-user.conf +++ b/etc/systemd/system/vdr.service.d/00-gentoo-vdr-user.conf @@ -3,16 +3,12 @@ # # use this file to override settings from vdr.service -## need testing, which one will work - -# test1 -#[Service] -# uncomment this if you have to set START_VDR_AS_ROOT="yes" in /etc/conf.d/vdr -#User=root - -# test2 -# For people who really know what they do -# and who want to start vdr as user root -# allowed values: yes no -# default: no -#START_VDR_AS_ROOT="no"
\ No newline at end of file +[Service] +# Uncomment this if you need to run vdr as root. +# ATTENTION !!! +# - START_VDR_AS_ROOT from /etc/conf.d/vdr IS IGNORED WHEN USING SYSTEMD !!! +# - if you use the dbus2vdr plugin, the user who owns the vdr-dbus-service +# has to also be set in /etc/dbus-1/system.d/de.tvdr.vdr.conf as root if +# you uncomment the line below +# +#User=root
\ No newline at end of file diff --git a/usr/lib/systemd/system/vdr.service b/usr/lib/systemd/system/vdr.service index c9f204e..3b94e11 100644 --- a/usr/lib/systemd/system/vdr.service +++ b/usr/lib/systemd/system/vdr.service @@ -18,7 +18,7 @@ EnvironmentFile=/var/vdr/tmp/systemd_env # start VDR with our desired parameters, please disable the # internal watchdog by setting the timeout to 0 -ExecStart=/usr/bin/vdr ${VDR_OPTS} +ExecStart=/usr/bin/vdr "${VDR_OPTS}" # execute addons/plugins scripts meant to be run afer starting ExecStartPost=/usr/share/vdr/systemd/vdr-systemd_helper.sh --start-post diff --git a/usr/share/vdr/systemd/vdr-systemd_helper.sh b/usr/share/vdr/systemd/vdr-systemd_helper.sh index a605585..f2b3f46 100644 --- a/usr/share/vdr/systemd/vdr-systemd_helper.sh +++ b/usr/share/vdr/systemd/vdr-systemd_helper.sh @@ -20,7 +20,7 @@ unset MAIL include rc-functions include plugin-functions -#init_tmp_dirs +init_tmp_dirs VDR_LOG_FILE="${PL_TMP}/vdr-start-log" @@ -29,18 +29,6 @@ SYSTEMD_ENV_FILE="${PL_TMP}/systemd_env" #common_init -# grep the user on who should vdr systemd running -# 2 values, vdr or root -run_as_user() { -. /etc/systemd/system/vdr.service.d/00-gentoo-vdr-user.conf - - if yesno "${START_VDR_AS_ROOT}"; then - systemd_vdr_user="root" - else - systemd_vdr_user="vdr" - fi -} - # dummy functions to make the rest of gentoo-vdr-scripts happy, # as we do not want to rely on openrc's implementations of these # commands: @@ -102,10 +90,11 @@ if [ "$1" = "--start-pre" ]; then init_params init_plugin_loader start || eexitfail "init_plugin_loader start" load_addons_prefixed pre-start || eexitfail "load_addons_prefixed pre-start" - run_as_user # these options are what we need to start VDR from the systemd unit file echo "VDR_OPTS=\"${vdr_opts}\"" > ${SYSTEMD_ENV_FILE} - echo "SYSTEMD_VDR_USER=\"${sytemd_vdr_user}\"" >> ${SYSTEMD_ENV_FILE} + # remove the command line --user argument if set by the scripts so far, + # as the user under which vdr will run is controlled by systemd + sed -e "s:'-u' 'vdr' ::" -i ${SYSTEMD_ENV_FILE} sync eend "--start-pre" elif [ "$1" = "--start-post" ]; then diff --git a/var/vdr/tmp/Makefile b/var/vdr/tmp/Makefile index 538ce84..3009af8 100644 --- a/var/vdr/tmp/Makefile +++ b/var/vdr/tmp/Makefile @@ -5,7 +5,7 @@ SHELL = /bin/bash MYDIR = $(DESTDIR)/var/vdr/tmp SUBDIRS = BINS = -CONFS = systemd_env plugins_skipped_ALL +CONFS = systemd_env all: diff --git a/var/vdr/tmp/plugins_skipped_ALL b/var/vdr/tmp/plugins_skipped_ALL deleted file mode 100644 index e69de29..0000000 --- a/var/vdr/tmp/plugins_skipped_ALL +++ /dev/null |