From: | "Joerg Bornkessel (hd_brummy)" <hd_brummy@g.o> |
---|---|
To: | gentoo-commits@l.g.o |
Subject: | [gentoo-commits] gentoo-x86 commit in media-plugins/vdr-cdplayer/files: confd rc-addon.sh |
Date: | Sun, 26 May 2013 16:00:47 |
Message-Id: | 20130526160041.5593E20081@flycatcher.gentoo.org |
1 | hd_brummy 13/05/26 16:00:41 |
2 | |
3 | Added: confd rc-addon.sh |
4 | Log: |
5 | initial ebuild, play CD's on VDR |
6 | |
7 | (Portage version: 2.1.11.50/cvs/Linux i686, signed Manifest commit with key 34C2808A) |
8 | |
9 | Revision Changes Path |
10 | 1.1 media-plugins/vdr-cdplayer/files/confd |
11 | |
12 | file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-plugins/vdr-cdplayer/files/confd?rev=1.1&view=markup |
13 | plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-plugins/vdr-cdplayer/files/confd?rev=1.1&content-type=text/plain |
14 | |
15 | Index: confd |
16 | =================================================================== |
17 | # /etc/conf.d/vdr.cdplayer |
18 | |
19 | |
20 | # Set way to your CD Drive |
21 | # allowed values: path to device |
22 | # default: /dev/cdrom |
23 | # |
24 | #CDPLAYER_DEVICE=/dev/cdrom |
25 | |
26 | # Set URL to the CDDB databank |
27 | # allowed values: URL to the databank |
28 | # default: freedb.freedb.org |
29 | # |
30 | #CDPLAYER_CDDB_SERVER="freedb.freedb.org" |
31 | |
32 | # Enable cddb request to the given db on top |
33 | # allowed values: yes no |
34 | # default: yes |
35 | # |
36 | #CDPLAYER_CDDB_QUERY="no" |
37 | |
38 | # Enable cache of cddb data |
39 | # allowed values: yes no |
40 | # default: yes |
41 | # |
42 | #CDPLAYER_CDDB_CACHE="no" |
43 | |
44 | # Set path to the cddb data cache dir |
45 | # allowed values: path to cache dir |
46 | # default: /var/cache/vdr/cdplayer |
47 | # |
48 | #CDPLAYER_CACHE_DIR= |
49 | |
50 | |
51 | |
52 | 1.1 media-plugins/vdr-cdplayer/files/rc-addon.sh |
53 | |
54 | file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-plugins/vdr-cdplayer/files/rc-addon.sh?rev=1.1&view=markup |
55 | plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-plugins/vdr-cdplayer/files/rc-addon.sh?rev=1.1&content-type=text/plain |
56 | |
57 | Index: rc-addon.sh |
58 | =================================================================== |
59 | # |
60 | # rc-addon-script for plugin cdplayer |
61 | # |
62 | # $Header: /var/cvsroot/gentoo-x86/media-plugins/vdr-cdplayer/files/rc-addon.sh,v 1.1 2013/05/26 16:00:41 hd_brummy Exp $ |
63 | |
64 | . /etc/conf.d/vdr.cdplayer |
65 | |
66 | CDPLAYER_CACHE_DIR="${CDPLAYER_CACHE_DIR:=/var/cache/vdr/cdplayer}" |
67 | |
68 | make_cachedir() { |
69 | # check, is CDPLAYER_CACHE_DIR available |
70 | if [ ! -d "${CDPLAYER_CACHE_DIR}" ]; then |
71 | mkdir "${CDPLAYER_CACHE_DIR}" |
72 | chown -R vdr:vdr "${CDPLAYER_CACHE_DIR}" |
73 | fi |
74 | } |
75 | |
76 | plugin_pre_vdr_start() { |
77 | |
78 | # default values |
79 | add_plugin_param "-c cdplayer" |
80 | add_plugin_param "-s cd.pmg" |
81 | |
82 | add_plugin_param "-d ${CDPLAYER_DEVICE:-/dev/cdrom}" |
83 | |
84 | if yesno ${CDPLAYER_CDDB_QUERY:-yes}; then |
85 | |
86 | add_plugin_param "-S ${CDPLAYER_CDDB_SERVER:=freedb.freedb.org}" |
87 | |
88 | if yesno ${CDPLAYER_CDDB_CACHE:-yes}; then |
89 | # CDDB cache directory |
90 | make_cachedir |
91 | add_plugin_param "-C ${CDPLAYER_CACHE_DIR}" |
92 | else |
93 | # disable CDDB cache |
94 | add_plugin_param "-N" |
95 | fi |
96 | |
97 | else |
98 | # disable CDDB request |
99 | add_plugin_param "-n" |
100 | |
101 | fi |
102 | } |