From e106ad75073211d2823b321b80460baeacb908ee Mon Sep 17 00:00:00 2001 From: Dobrica Pavlinusic Date: Mon, 16 Apr 2012 22:13:21 +0200 Subject: [PATCH] added shortcut to start reader without Amazon framework This was inspired by conversation on forum about memory usage on DXG http://www.mobileread.com/forums/showthread.php?p=2044347#post2044347 --- launchpad/kpdf.ini | 2 ++ launchpad/kpdf.sh | 10 ++++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/launchpad/kpdf.ini b/launchpad/kpdf.ini index 4ad18602..316cf785 100755 --- a/launchpad/kpdf.ini +++ b/launchpad/kpdf.ini @@ -3,5 +3,7 @@ P D = !/mnt/us/launchpad/kpdf.sh /mnt/us/documents # start kindlepdfviewer with last document P P = !/mnt/us/launchpad/kpdf.sh +# start kindlepdfviewer without framework +P K = !/mnt/us/launchpad/kpdf.sh /mnt/us/documents framework_stop # restart amazon framework - when it got irritated P R = !/etc/init.d/framework restart diff --git a/launchpad/kpdf.sh b/launchpad/kpdf.sh index 5c0611f2..1cd6dc63 100755 --- a/launchpad/kpdf.sh +++ b/launchpad/kpdf.sh @@ -8,9 +8,15 @@ cd /mnt/us/kindlepdfviewer/ grep /mnt/us/kindlepdfviewer/fonts/host /proc/mounts || mount -o bind /usr/java/lib/fonts /mnt/us/kindlepdfviewer/fonts/host +test "$2" == "framework_stop" && /etc/init.d/framework stop + ./reader.lua "$1" 2> /mnt/us/kindlepdfviewer/crash.log || cat /mnt/us/kindlepdfviewer/crash.log grep /mnt/us/kindlepdfviewer/fonts/host /proc/mounts && umount /mnt/us/kindlepdfviewer/fonts/host -killall -cont cvm -echo 1 > /proc/eink_fb/update_display +# always try to continue cvm +killall -cont cvm || /etc/init.d/framework start + +# cleanup hanging process +killall lipc-wait-event +