View Single Post
Old 02-15-2013, 01:58 PM   #7
DuckieTigger
Wizard
DuckieTigger ought to be getting tired of karma fortunes by now.DuckieTigger ought to be getting tired of karma fortunes by now.DuckieTigger ought to be getting tired of karma fortunes by now.DuckieTigger ought to be getting tired of karma fortunes by now.DuckieTigger ought to be getting tired of karma fortunes by now.DuckieTigger ought to be getting tired of karma fortunes by now.DuckieTigger ought to be getting tired of karma fortunes by now.DuckieTigger ought to be getting tired of karma fortunes by now.DuckieTigger ought to be getting tired of karma fortunes by now.DuckieTigger ought to be getting tired of karma fortunes by now.DuckieTigger ought to be getting tired of karma fortunes by now.
 
DuckieTigger's Avatar
 
Posts: 4,763
Karma: 246906703
Join Date: Dec 2011
Location: USA
Device: Oasis 3, Oasis 2, PW3, PW1, KT
In your ntpdate.sh, after moving the logfile to /mnt/us/documents/ntpdate.txt, why not opening that file so you can look at it? Like this (in red) in ntpdate.sh:

Code:
****snipsnip****

if [ x$RPT == 'xtrue' ]
then
  mv $LOG /mnt/us/documents/ntpdate.txt
  dbus-send --system /default com.lab126.powerd.resuming int32:1
  lipc-set-prop com.lab126.appmgrd start \
    app://com.lab126.booklet.reader/mnt/us/documents/ntpdate.txt
else
  rm $LOG
fi

exit 0
Just tested it and it works - it will open up the logfile to look at it. Another idea to improve might be to have the logfile NOT in /mnt/us/documents, so that the indexer does not have to worry about it. Maybe have it in /mnt/us/opt/log/ntpdate.txt and add a KUAL button to:

lipc-set-prop com.lab126.appmgrd start app://com.lab126.booklet.reader/mnt/us/opt/log/ntpdate.txt

(not sure if that works in the menu.json directly, or if you have to wrap it around another shell script)

This works fine by editing menu.json to:
Code:
{
    "items": [
        {
        "name": "Helper",
        "priority": 0,
        "items": [
            {"name": "Set DateTime from Server", "priority": 1, "action": "bin/ntpdate.sh"},
            {"name": "Show DateTime log", "priority":1, "action": "lipc-set-prop com.lab126.appmgrd start app://com.lab126.booklet.reader/mnt/us/documents/ntpdate.txt"}
        ]
        }
    ]
}
(might need to consider to move it to different folder then, better a subfolder, as the reader creates ntpdate.sdr subfolder.)

Last edited by DuckieTigger; 02-15-2013 at 02:10 PM. Reason: added menu.json support
DuckieTigger is offline   Reply With Quote