Gentoo Archives: gentoo-commits

From: "Matthias Schwarzott (zzam)" <zzam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in net-www/vdradmin-am/files: vdradmin-rc-3
Date: Fri, 29 Feb 2008 10:23:32
Message-Id: E1JV2On-00032Q-JW@stork.gentoo.org
1 zzam 08/02/29 10:23:29
2
3 Added: vdradmin-rc-3
4 Log:
5 Fix initscript on openrc, thanks to Daniel Pielmeier <daniel.pielmeier@××××××××××.com>.
6 (Portage version: 2.1.4.4)
7
8 Revision Changes Path
9 1.1 net-www/vdradmin-am/files/vdradmin-rc-3
10
11 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-www/vdradmin-am/files/vdradmin-rc-3?rev=1.1&view=markup
12 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-www/vdradmin-am/files/vdradmin-rc-3?rev=1.1&content-type=text/plain
13
14 Index: vdradmin-rc-3
15 ===================================================================
16 #!/sbin/runscript
17 # Copyright 1999-2003 Gentoo Technologies, Inc.
18 # Distributed under the terms of the GNU General Public License, v2 or later
19 # $Header: /var/cvsroot/gentoo-x86/net-www/vdradmin-am/files/vdradmin-rc-3,v 1.1 2008/02/29 10:23:29 zzam Exp $
20
21 depend() {
22 need vdr
23 }
24
25 set_charset() {
26 local capfile=/usr/share/vdr/capabilities.sh
27 [ -e "${capfile}" ] && . ${capfile}
28 if [ "${CAP_UTF8}" = "1" -o "${VDR_CAN_HANDLE_UTF8}" = "yes" ]; then
29 # do not clean out utf8
30 :
31 else
32 l=$(locale | sed -e 's/\.[uU][tT][fF]\(-\)\?8//' -e 's/^/export /')
33 eval $l
34 fi
35 }
36
37 start() {
38 ebegin "Starting vdradmin-am"
39
40 : ${VDRADMIN_USER:=vdradmin}
41
42 # Guarantee that vdradmin can access its tmp-dir
43 chown -R "${VDRADMIN_USER}:vdradmin" /var/tmp/vdradmin
44
45 set_charset
46 if [ -x /etc/init.d/root ]; then
47 # running on baselayout-2/openrc
48 start-stop-daemon --start --background --chuid "${VDRADMIN_USER}" --exec /usr/bin/perl /usr/bin/vdradmind.pl
49 else
50 start-stop-daemon --start --background --chuid "${VDRADMIN_USER}" --exec /usr/bin/vdradmind.pl
51 fi
52 eend $?
53 }
54
55 stop() {
56 ebegin "Stopping vdradmin-am"
57 start-stop-daemon --stop --quiet --pidfile /var/tmp/vdradmin/vdradmind.pid
58 eend $?
59 }
60
61
62
63 --
64 gentoo-commits@l.g.o mailing list