summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDoug Goldstein <cardoe@gentoo.org>2005-05-22 22:43:19 +0000
committerDoug Goldstein <cardoe@gentoo.org>2005-05-22 22:43:19 +0000
commit77c83d2a3a26d2cd9bf739c381f5241f53444c0b (patch)
treee304a36e42b599dadf09e0721b818f83fcdc5a21 /media-tv
parentmarked x86 stable (diff)
downloadgentoo-2-77c83d2a3a26d2cd9bf739c381f5241f53444c0b.tar.gz
gentoo-2-77c83d2a3a26d2cd9bf739c381f5241f53444c0b.tar.bz2
gentoo-2-77c83d2a3a26d2cd9bf739c381f5241f53444c0b.zip
fixed init script
(Portage version: 2.0.51.22-r1)
Diffstat (limited to 'media-tv')
-rw-r--r--media-tv/mythtv/ChangeLog6
-rw-r--r--media-tv/mythtv/files/0.18-mythbackend.rc45
2 files changed, 29 insertions, 22 deletions
diff --git a/media-tv/mythtv/ChangeLog b/media-tv/mythtv/ChangeLog
index d29137356ef6..96480a57a3d4 100644
--- a/media-tv/mythtv/ChangeLog
+++ b/media-tv/mythtv/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for media-tv/mythtv
# Copyright 2000-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-tv/mythtv/ChangeLog,v 1.57 2005/05/16 08:57:07 cardoe Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-tv/mythtv/ChangeLog,v 1.58 2005/05/22 22:43:19 cardoe Exp $
+
+ 22 May 2005; Doug Goldstein <cardoe@gentoo.org> files/0.18-mythbackend.rc:
+ Fix warning msg for users running MythTV as root.
+ Fix pidfile problem for non-root users
*mythtv-0.18.1 (16 May 2005)
diff --git a/media-tv/mythtv/files/0.18-mythbackend.rc b/media-tv/mythtv/files/0.18-mythbackend.rc
index b745146b5b97..25a7610ea0cb 100644
--- a/media-tv/mythtv/files/0.18-mythbackend.rc
+++ b/media-tv/mythtv/files/0.18-mythbackend.rc
@@ -1,7 +1,7 @@
#!/sbin/runscript
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/media-tv/mythtv/files/0.18-mythbackend.rc,v 1.2 2005/05/14 17:10:03 cardoe Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-tv/mythtv/files/0.18-mythbackend.rc,v 1.3 2005/05/22 22:43:19 cardoe Exp $
depend() {
need net
@@ -9,29 +9,31 @@ depend() {
}
checkconfig() {
- for i in $(groups "${MYTH_USER/:*/}") ; do
- [[ "${i}" == "audio" ]] && audio="yes"
- [[ "${i}" == "video" ]] && video="yes"
- done
-
- if [ -z "${audio}" -o -z "${video}" ] ; then
- ewarn ""
- [[ -z "${audio}" ]] && \
+ if [ ${MYTH_USER} != "root" ]; then
+ for i in $(groups "${MYTH_USER/:*/}") ; do
+ [[ "${i}" == "audio" ]] && audio="yes"
+ [[ "${i}" == "video" ]] && video="yes"
+ done
+
+ if [ -z "${audio}" -o -z "${video}" ] ; then
+ ewarn ""
+ [[ -z "${audio}" ]] && \
ewarn "${HILITE}${MYTH_USER/:*/}${NORMAL} is not in the audio group"
- [[ -z "${video}" ]] && \
+ [[ -z "${video}" ]] && \
ewarn "${HILITE}${MYTH_USER/:*/}${NORMAL} is not in the video group"
- ewarn ""
- ewarn "insufficient permissions discovered"
- ewarn "mythbackend may not start correctly"
- ewarn ""
+ ewarn ""
+ ewarn "insufficient permissions discovered"
+ ewarn "mythbackend may not start correctly"
+ ewarn ""
+ fi
fi
}
start() {
- checkconfig
- [[ -z "${MYTH_USER}" ]] && MYTH_USER="nobody:nobody"
+ [[ -z "${MYTH_USER}" ]] && MYTH_USER="nobody"
[[ -z "${MYTH_NICE}" ]] && MYTH_NICE="0"
[[ -z "${MYTH_VERBOSE}" ]] && MYTH_VERBOSE="none"
+ checkconfig
HOME="/var/log/mythtv/"
QTDIR=/usr/qt/3
@@ -39,16 +41,17 @@ start() {
# Work around any strange permissions that may be on these files.
chown -R "${MYTH_USER}" /var/log/mythtv/
- ebegin "Starting myth backend"
+ ebegin "Starting MythTV Backend"
start-stop-daemon --start --quiet --chuid "${MYTH_USER}" \
- --exec /usr/bin/mythbackend --nicelevel "${MYTH_NICE}" -- \
- --daemon --pidfile /var/run/mythbackend.pid --logfile /var/log/mythtv/mythbackend.log \
- --verbose ${MYTH_VERBOSE}
+ --exec /usr/bin/mythbackend --nicelevel "${MYTH_NICE}" \
+ --make-pidfile --pidfile /var/run/mythbackend.pid \
+ --background -- --verbose ${MYTH_VERBOSE} \
+ --logfile /var/log/mythtv/mythbackend.log
eend $?
}
stop () {
- ebegin "Stopping myth backend"
+ ebegin "Stopping MythTV Backend"
start-stop-daemon --stop --quiet --pidfile=/var/run/mythbackend.pid
eend $?
}