View Single Post
Old 07-28-2022, 06:25 PM   #57
sherman
Guru
sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.
 
Posts: 867
Karma: 2676800
Join Date: Aug 2008
Location: Taranaki - NZ
Device: Kobo Aura H2O, Kobo Forma
Quote:
Originally Posted by ajkessel View Post
Thanks! I am actually trying to do it all in the shell script. Here is the full context:
Code:
#!/bin/sh
qndb -t 60000 -s pfmDoneProcessing -m pfmRescanBooksFull
echo usb plug add >>/tmp/nickel-hardware-status
sleep 10
echo usb plug remove >>/tmp/nickel-hardware-status
The goal is to trigger KoboCloud to sync with the cloud, and then to trigger a USB connect/disconnect in order to get AutoShelf to organize the newly downloaded items into collections. When I run the first command from telnet, it waits until it's done. When I run it from the shell script triggered by cmd_spawn, it seems to skip instantly to the next step without waiting for the rescan to complete.

Am I doing it wrong?
That looks ok.

I suggest showing a couple of toasts to see what's going on. Eg:
Code:
qndb -m mwcToast 3000 "Faking USB plug"
qndb -m mwcToast 3000 "Faking USB unplug"
sherman is offline   Reply With Quote