diff options
author | Joerg Bornkessel <hd_brummy@gentoo.org> | 2014-10-18 21:37:12 +0200 |
---|---|---|
committer | Joerg Bornkessel <hd_brummy@gentoo.org> | 2014-10-18 21:37:12 +0200 |
commit | f5a908c07bacf9cf49eecdc12057862f76c6295a (patch) | |
tree | c312dfcd5c1c9acdf5c73ef21d374e0125e0a5b5 /usr | |
parent | added --keep-going to vdrplugin-rebuild; added empty file plugins_skipped_ALL... (diff) | |
download | gentoo-vdr-scripts-f5a908c07bacf9cf49eecdc12057862f76c6295a.tar.gz gentoo-vdr-scripts-f5a908c07bacf9cf49eecdc12057862f76c6295a.tar.bz2 gentoo-vdr-scripts-f5a908c07bacf9cf49eecdc12057862f76c6295a.zip |
reverted changes for vdrplugin-rebuild -s paramater; fixed systemd support wrt bug 353492#33 ff, thx to L.Muresan
Diffstat (limited to 'usr')
-rw-r--r-- | usr/lib/systemd/system/vdr.service | 2 | ||||
-rw-r--r-- | usr/share/vdr/systemd/vdr-systemd_helper.sh | 19 |
2 files changed, 5 insertions, 16 deletions
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 |