Lines 20-26
Link Here
|
20 |
|
20 |
|
21 |
include rc-functions |
21 |
include rc-functions |
22 |
include plugin-functions |
22 |
include plugin-functions |
23 |
#init_tmp_dirs |
23 |
init_tmp_dirs |
24 |
|
24 |
|
25 |
VDR_LOG_FILE="${PL_TMP}/vdr-start-log" |
25 |
VDR_LOG_FILE="${PL_TMP}/vdr-start-log" |
26 |
|
26 |
|
Lines 29-45
Link Here
|
29 |
|
29 |
|
30 |
#common_init |
30 |
#common_init |
31 |
|
31 |
|
32 |
# grep the user on who should vdr systemd running |
|
|
33 |
# 2 values, vdr or root |
34 |
run_as_user() { |
35 |
. /etc/systemd/system/vdr.service.d/00-gentoo-vdr-user.conf |
36 |
|
37 |
if yesno "${START_VDR_AS_ROOT}"; then |
38 |
systemd_vdr_user="root" |
39 |
else |
40 |
systemd_vdr_user="vdr" |
41 |
fi |
42 |
} |
43 |
|
32 |
|
44 |
# dummy functions to make the rest of gentoo-vdr-scripts happy, |
33 |
# dummy functions to make the rest of gentoo-vdr-scripts happy, |
45 |
# as we do not want to rely on openrc's implementations of these |
34 |
# as we do not want to rely on openrc's implementations of these |
Lines 102-111
Link Here
|
102 |
init_params |
91 |
init_params |
103 |
init_plugin_loader start || eexitfail "init_plugin_loader start" |
92 |
init_plugin_loader start || eexitfail "init_plugin_loader start" |
104 |
load_addons_prefixed pre-start || eexitfail "load_addons_prefixed pre-start" |
93 |
load_addons_prefixed pre-start || eexitfail "load_addons_prefixed pre-start" |
105 |
run_as_user |
|
|
106 |
# these options are what we need to start VDR from the systemd unit file |
94 |
# these options are what we need to start VDR from the systemd unit file |
107 |
echo "VDR_OPTS=\"${vdr_opts}\"" > ${SYSTEMD_ENV_FILE} |
95 |
echo "VDR_OPTS=\"${vdr_opts}\"" > ${SYSTEMD_ENV_FILE} |
108 |
echo "SYSTEMD_VDR_USER=\"${sytemd_vdr_user}\"" >> ${SYSTEMD_ENV_FILE} |
96 |
# remove the command line --user argument if set by the scripts so far, |
|
|
97 |
# as the user under which vdr will run is controlled by systemd |
98 |
sed -e "s:'-u' 'vdr' ::" -i ${SYSTEMD_ENV_FILE} |
109 |
sync |
99 |
sync |
110 |
eend "--start-pre" |
100 |
eend "--start-pre" |
111 |
elif [ "$1" = "--start-post" ]; then |
101 |
elif [ "$1" = "--start-post" ]; then |