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 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 start-stop-daemon --start --quiet --background --pidfile $PIDFILE --exec $DAEMON -- $DAEMON_ARGS
status=$? status=$?
(snail.autostop &>/dev/null)& (nohup snail.autostop &>/dev/null)&
eend $status eend $status
} }

View File

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

View File

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

View File

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