summaryrefslogtreecommitdiff
path: root/media-plugins/vdr-osdteletext/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-03-12 21:55:15 +0000
committerV3n3RiX <venerix@redcorelinux.org>2021-03-12 21:55:15 +0000
commit7218e1b46bceac05841e90472501742d905fb3fc (patch)
tree56fae051db521b8fce8014cbc8b11484885b14b3 /media-plugins/vdr-osdteletext/files
parent6d691ad5b6239929063441bbd14c489e92e7396e (diff)
gentoo resync : 12.03.2021
Diffstat (limited to 'media-plugins/vdr-osdteletext/files')
-rw-r--r--media-plugins/vdr-osdteletext/files/confd37
-rw-r--r--media-plugins/vdr-osdteletext/files/rc-addon.sh44
2 files changed, 81 insertions, 0 deletions
diff --git a/media-plugins/vdr-osdteletext/files/confd b/media-plugins/vdr-osdteletext/files/confd
new file mode 100644
index 000000000000..a54934d2e047
--- /dev/null
+++ b/media-plugins/vdr-osdteletext/files/confd
@@ -0,0 +1,37 @@
+# /etc/conf.d/vdr.osdteletext
+
+# ################################################
+#
+# for minimal activity on your harddisc
+# store the vtx files in a temp filesystem
+# allowed values: yes no
+# default: yes
+#OSDTELETEXT_TMPFS=yes
+
+
+# ######### Expert Functions ###################
+#
+# set the size of the videotext store
+# (when using TMPFS this is taken from RAM)
+# allowed values: size in megabyte
+# default: 20 # used 20 Mb for videotext
+#OSDTELETEXT_SIZE=20
+
+# set the dir of the tmpfs
+# allowed values: directory names
+# default: /var/cache/vdr/osdteletext
+#OSDTELETEXT_DIR=/var/cache/vdr/osdteletext
+
+# store top text pages at cache. (unviewable pages)
+# allowed values: yes no
+# default: no
+#OSDTELETEXT_STORETOPTEXT=no
+
+# ######## NOTE! ################################
+#
+# User with an old install have an entry like
+#
+# tmpfs /vtx tmpfs size=20M 0 0
+#
+# in the /etc/fstab
+# you can remove the entry, not needed anymore.
diff --git a/media-plugins/vdr-osdteletext/files/rc-addon.sh b/media-plugins/vdr-osdteletext/files/rc-addon.sh
new file mode 100644
index 000000000000..f9ccd119d019
--- /dev/null
+++ b/media-plugins/vdr-osdteletext/files/rc-addon.sh
@@ -0,0 +1,44 @@
+#
+# 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}
+
+plugin_pre_vdr_start() {
+ # depends on QA, create paths in /var/cache on the fly at runtime as needed
+ if [ ! -d "${OSDTELETEXT_DIR}" ]; then
+ mkdir -p ${OSDTELETEXT_DIR}
+ chown vdr:vdr ${OSDTELETEXT_DIR}
+ fi
+
+ 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
+}