blob: 2cae50ba3702bab4d9c441b883e5c9dbb0eb139f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
# $Id$
#
# rc-addon-script for plugin osdteletext
#
# Joerg Bornkessel <hd_brummy@gentoo.org>
# Matthias Schwarzott <zzam@gentoo.org>
: ${OSDTELETEXT_TMPFS:=yes}
: ${OSDTELETEXT_SIZE:=20}
: ${OSDTELETEXT_DIR:=/var/cache/vdr/osdteletext}
: ${OSDTELETEXT_STORETOPTEXT:=no}
# depends on QA, create paths in /var/cache on the fly at runtime as needed
init_cache_dir() {
if [ ! -d "${OSDTELETEXT_DIR}" ]; then
mkdir -p ${OSDTELETEXT_DIR}
chown vdr:vdr ${OSDTELETEXT_DIR}
fi
}
plugin_pre_vdr_start() {
init_cache_dir
add_plugin_param "-d ${OSDTELETEXT_DIR}"
add_plugin_param "-n ${OSDTELETEXT_SIZE}"
if [ "${OSDTELETEXT_STORETOPTEXT}" = "yes" ]; then
add_plugin_param "-t"
fi
if [ "${OSDTELETEXT_TMPFS}" = "yes" ]; then
## test on mountet TMPFS
if /bin/mount | /bin/grep -q ${OSDTELETEXT_DIR} ; then
:
else
einfo_level2 mounting videotext dir ${OSDTELETEXT_DIR}
sudo /bin/mount -t tmpfs -o size=${OSDTELETEXT_SIZE}m,uid=vdr,gid=vdr tmpfs ${OSDTELETEXT_DIR}
fi
fi
}
plugin_post_vdr_stop() {
if [ "${OSDTELETEXT_TMPFS}" = "yes" ]; then
if /bin/mount | /bin/grep -q ${OSDTELETEXT_DIR} ; then
einfo_level2 unmounting videotext dir ${OSDTELETEXT_DIR}
sudo /bin/umount ${OSDTELETEXT_DIR}
fi
fi
}
|