Autostop fixes.

This commit is contained in:
Kolan Sh 2011-12-25 02:45:06 +03:00
parent 3da3e86007
commit 85f3ff81c9
5 changed files with 7 additions and 11 deletions

View File

@ -15,7 +15,7 @@ start() {
export LD_LIBRARY_PATH=/usr/lib/opengl/nvidia/lib:/usr/lib/opengl/nvidia/lib
start-stop-daemon --start --quiet --background --pidfile $PIDFILE --exec $DAEMON -- $DAEMON_ARGS
status=$?
(snail.autostop &>/dev/null)&
(nohup snail.autostop &>/dev/null)&
eend $status
}

View File

@ -1,7 +1,7 @@
#!/bin/sh
LOCK_FILE=/tmp/.snail.nvrun.lock
NVRUN=/usr/local/bin/nvrun
NVRUN=snail.nvrun
(
for i in `seq 16`; do
@ -16,7 +16,6 @@ NVRUN=/usr/local/bin/nvrun
break
fi
echo sleep 1
sleep 1
done
@ -44,11 +43,10 @@ snail.nvrun "$@"
break
fi
echo sleep 1 aaa
sleep 1
done
pgrep -f $NVRUN &>/dev/null
pgrep $NVRUN &>/dev/null
if [ 0 -eq $? ]; then
echo "Other applications still use nVidia chip. So we aren't switching off it, just exiting..."

View File

@ -2,7 +2,7 @@
model=`sudo snail.dmidecode`
let retry=5
let retry=8
while [ $retry -ne 0 ]; do
case "$model" in

View File

@ -2,7 +2,7 @@
model=`sudo snail.dmidecode`
let retry=5
let retry=8
while [ $retry -ne 0 ]; do
case "$model" in

View File

@ -1,10 +1,10 @@
#!/bin/sh
LOCK_FILE=/tmp/.snail.nvrun.lock
NVRUN=/usr/local/bin/nvrun
NVRUN=nvrun
while [ 1 ]; do
pgrep -f $NVRUN &>/dev/null
pgrep "$NVRUN" &>/dev/null
if [ 0 -ne $? ]; then
@ -21,7 +21,6 @@ while [ 1 ]; do
break
fi
echo sleep 1
sleep 1
done
@ -32,7 +31,6 @@ while [ 1 ]; do
) 9>$LOCK_FILE ; exit $?
fi
echo sleep 1
sleep 1
done