vdr: use own /var/run/vdr tmpfs mount

This commit is contained in:
Stefan Saraev 2013-05-26 12:34:29 +03:00
parent 698753897f
commit e7bc03a433

View File

@ -22,6 +22,14 @@
. /etc/profile . /etc/profile
check_tmpfs_mount() {
grep " /var/run/vdr " /proc/mounts >/dev/null
if [ $? -ne 0 ] ; then
mkdir -p /var/run/vdr
mount -t tmpfs -o size=10% tmpfs /var/run/vdr
fi
}
LOCKDIR="/var/lock/" LOCKDIR="/var/lock/"
LOCKFILE="vdr.disabled" LOCKFILE="vdr.disabled"
@ -153,6 +161,7 @@ if [ ! "$(pidof vdr.bin)" ];then
fi fi
while [ true ] ; do while [ true ] ; do
if [ -f "$LOCKDIR/$LOCKFILE" ] ; then if [ -f "$LOCKDIR/$LOCKFILE" ] ; then
umount /var/run/vdr 2>&1
break break
fi fi
# (wait for) at least 1 adapter (xbmc allows to set 0) # (wait for) at least 1 adapter (xbmc allows to set 0)
@ -161,6 +170,7 @@ if [ ! "$(pidof vdr.bin)" ];then
sleep 1 sleep 1
continue continue
fi fi
check_tmpfs_mount
LANG=en_US.UTF-8 LD_LIBRARY_PATH="$ADDON_DIR/lib:$LD_LIBRARY_PATH" eval vdr.bin $VDR_ARG &>$LOG_FILE LANG=en_US.UTF-8 LD_LIBRARY_PATH="$ADDON_DIR/lib:$LD_LIBRARY_PATH" eval vdr.bin $VDR_ARG &>$LOG_FILE
done & done &
fi fi