Gentoo Archives: gentoo-commits

From: "Matthias Schwarzott (zzam)" <zzam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-vdr r606 - in gentoo-vdr-scripts/trunk: . etc/init.d usr/share/vdr/inc usr/share/vdr/shutdown
Date: Fri, 30 May 2008 02:49:37
Message-Id: E1K1ugN-0003va-EB@stork.gentoo.org
1 Author: zzam
2 Date: 2008-05-30 02:49:30 +0000 (Fri, 30 May 2008)
3 New Revision: 606
4
5 Modified:
6 gentoo-vdr-scripts/trunk/ChangeLog
7 gentoo-vdr-scripts/trunk/etc/init.d/vdr
8 gentoo-vdr-scripts/trunk/usr/share/vdr/inc/rc-functions.sh
9 gentoo-vdr-scripts/trunk/usr/share/vdr/shutdown/pre-shutdown-20-check-blocking-programs.sh
10 gentoo-vdr-scripts/trunk/usr/share/vdr/shutdown/pre-shutdown-99-periodic-thread.sh
11 Log:
12 Small cleanup.
13
14 Modified: gentoo-vdr-scripts/trunk/ChangeLog
15 ===================================================================
16 --- gentoo-vdr-scripts/trunk/ChangeLog 2008-05-29 16:21:40 UTC (rev 605)
17 +++ gentoo-vdr-scripts/trunk/ChangeLog 2008-05-30 02:49:30 UTC (rev 606)
18 @@ -1,6 +1,12 @@
19 # ChangeLog for gentoo-vdr-scripts
20 # $Id$
21
22 + 30 May 2008; Matthias Schwarzott <zzam@g.o>
23 + usr/share/vdr/shutdown/pre-shutdown-20-check-blocking-programs.sh,
24 + usr/share/vdr/shutdown/pre-shutdown-99-periodic-thread.sh, etc/init.d/vdr,
25 + usr/share/vdr/inc/rc-functions.sh:
26 + Small cleanup.
27 +
28 29 May 2008; Matthias Schwarzott <zzam@g.o> etc/init.d/vdr,
29 -usr/share/vdr/inc/message-functions.sh,
30 usr/share/vdr/inc/rc-functions.sh:
31
32 Modified: gentoo-vdr-scripts/trunk/etc/init.d/vdr
33 ===================================================================
34 --- gentoo-vdr-scripts/trunk/etc/init.d/vdr 2008-05-29 16:21:40 UTC (rev 605)
35 +++ gentoo-vdr-scripts/trunk/etc/init.d/vdr 2008-05-30 02:49:30 UTC (rev 606)
36 @@ -37,15 +37,9 @@
37 rm -f "${VDR_LOG_FILE}"
38 > "${VDR_LOG_FILE}"
39
40 -
41 einfo "Preparing start of vdr:"
42 init_params
43 - init_daemonctrl_params
44 -
45 - [ -z "${VDR_BIN}" ] && VDR_BIN=/usr/bin/vdr
46 -
47 add_daemonctrl_param --start --chdir ~vdr --exec ${VDR_BIN}
48 -
49
50 load_addons_prefixed pre-start || return 1
51
52 @@ -108,7 +102,6 @@
53
54 stop() {
55 INIT_PHASE="stop"
56 - [ -z "${VDR_BIN}" ] && VDR_BIN=/usr/bin/vdr
57 load_functions
58 load_addons_prefixed pre-stop
59
60
61 Modified: gentoo-vdr-scripts/trunk/usr/share/vdr/inc/rc-functions.sh
62 ===================================================================
63 --- gentoo-vdr-scripts/trunk/usr/share/vdr/inc/rc-functions.sh 2008-05-29 16:21:40 UTC (rev 605)
64 +++ gentoo-vdr-scripts/trunk/usr/share/vdr/inc/rc-functions.sh 2008-05-30 02:49:30 UTC (rev 606)
65 @@ -12,8 +12,6 @@
66 : ${SCRIPT_DEBUG_LEVEL:=0}
67 SCRIPT_API=2
68
69 -pidof=pidof
70 -
71 . /etc/conf.d/vdr.watchdogd
72 ENABLE_EXTERNAL_WATCHDOG=${ENABLE_EXTERNAL_WATCHDOG:-yes}
73
74 @@ -21,7 +19,7 @@
75
76 test_vdr_process()
77 {
78 - ${pidof} /usr/bin/vdr >/dev/null
79 + pidof "${VDR_BIN}" >/dev/null
80 }
81
82 getvdrversion()
83 @@ -36,14 +34,17 @@
84 esac
85 }
86
87 +[ -z "${VDR_BIN}" ] && VDR_BIN=/usr/bin/vdr
88 getvdrversion
89
90 -init_daemonctrl_params()
91 +init_params()
92 {
93 - # init variable for parameters
94 + # init variables for vdr/daemonctrl parameters
95 + vdr_opts=""
96 daemonctrl_opts=""
97 }
98
99 +
100 add_daemonctrl_param()
101 {
102 while [ -n "$1" ]; do
103 @@ -52,12 +53,6 @@
104 done
105 }
106
107 -init_params()
108 -{
109 - # init variable for parameters
110 - vdr_opts=""
111 -}
112 -
113 add_param()
114 {
115 while [ -n "$1" ]; do
116
117 Modified: gentoo-vdr-scripts/trunk/usr/share/vdr/shutdown/pre-shutdown-20-check-blocking-programs.sh
118 ===================================================================
119 --- gentoo-vdr-scripts/trunk/usr/share/vdr/shutdown/pre-shutdown-20-check-blocking-programs.sh 2008-05-29 16:21:40 UTC (rev 605)
120 +++ gentoo-vdr-scripts/trunk/usr/share/vdr/shutdown/pre-shutdown-20-check-blocking-programs.sh 2008-05-30 02:49:30 UTC (rev 606)
121 @@ -3,9 +3,8 @@
122 SHUTDOWN_CHECK_PROGRAMS="${SHUTDOWN_CHECK_PROGRAMS} tcmplex-panteltje vdr2ac3.sh dvdauthor mkisofs"
123 SHUTDOWN_CHECK_PROGRAMS="${SHUTDOWN_CHECK_PROGRAMS} growisofs cdrdao cdrecord"
124
125 -PIDOF=pidof
126 for PROG in ${SHUTDOWN_CHECK_PROGRAMS} ${SHUTDOWN_CHECK_ADDITIONAL_PROGRAMS}; do
127 - if ${PIDOF} -x ${PROG} >/dev/null; then
128 + if pidof -x ${PROG} >/dev/null; then
129 # stop shutdown
130 shutdown_abort_can_force "${PROG} is running"
131 break
132
133 Modified: gentoo-vdr-scripts/trunk/usr/share/vdr/shutdown/pre-shutdown-99-periodic-thread.sh
134 ===================================================================
135 --- gentoo-vdr-scripts/trunk/usr/share/vdr/shutdown/pre-shutdown-99-periodic-thread.sh 2008-05-29 16:21:40 UTC (rev 605)
136 +++ gentoo-vdr-scripts/trunk/usr/share/vdr/shutdown/pre-shutdown-99-periodic-thread.sh 2008-05-30 02:49:30 UTC (rev 606)
137 @@ -11,8 +11,7 @@
138 [ "${ENABLE_SHUTDOWN_PERIODIC_JOBS}" = "yes" ] || return
139
140 # when periodic-thread runs
141 - local PIDOF=pidof
142 - if ${PIDOF} -x vdrshutdown-periodic-thread.sh >/dev/null; then
143 + if pidof -x vdrshutdown-periodic-thread.sh >/dev/null; then
144 # stop shutdown which can be forced
145 shutdown_abort_can_force "periodic jobs are waiting"
146
147
148 --
149 gentoo-commits@l.g.o mailing list