Hi,
I’ve just release a new version of OMNewRotate (source, it’s OpenPGP signature, an ipkg tested agains FSO M4.1 and it’s OpenPGP signature), the ‘Automagically Lazy Edition’ because it’s just like the ‘Lazy Edition’ but with Autotools magic. Yes, I know it doesn’t work well with suspend. I’ve just gotter suspend to work on my OpenMoko, so expect that it is fixed by 0.6.0.
From the ChangeLog:
2008-12-09 - 0.5.1 - Automagically lazy * same as 0.5.0 plus auto tools magic * desktop icon * places a starter script
Did I mention omnewrotate was bitbaked directly from the svn revision of this release? Oh, I didn’t, but it was… 🙂
What about putting scripts in suspend.d and resume.d?
Didn’t know about that, I will investigate! Thanks for the tip!
based on the comment for startup in a previous post i did this
i kill rotate before suspend: root@om-gta02 ~ $ echo ‘killall rotate’ > /etc/apm/suspend.d/11omnewrotate
root@om-gta02 ~ $ chmod +x /etc/apm/suspend.d/11omnewrotate
and for restart i copy from Xsession: root@om-gta02 ~ $ cp /etc/X11/Xsession.d/89omnewrotate /etc/apm/resume.d/
in the ipk and the startup script should be /usr/bin/omnewrotate& instead of /usr/bin/rotate&
so in my previous post replace killall rotate with killall omnewrotate
Yes Kumar, I noticed that bug and corrected it yesterday.
As I tested the suspend/resume scripts on my FSO M4.1, they didn’t work. Do they need to start with a number? Could that be my mistake?
Anyway, those scripts are probably a mere workaround, the real solution is by knowing when it’s suspending/resuming, if possible through frameworkd.
I just tried using numbers, but still the scripts aren’t run. What did you do to have them working?
the numbers are for order only.it worked for me with 0.5.0 and SHR not the last image( the one from 28/11) but it doesn’t work anymore suspend.d seem to work but not rsume
Aha! So that’s why…
now it works with those two scripts:
#!/bin/sh
#/etc/apm/suspend.d/11omnewrotate
echo ‘omnr suspend’ >> /home/root/omnr.log
omnr=$(pidof omnewrotate)
#echo $omnr
if [ “$omnr” ]; then
echo ‘omnr running,trying to stop’ >> /home/root/omnr.log
killall omnewrotate >> /home/root/omnr.log
else
echo ‘omnr not running’ >> /home/root/omnr.log
fi
#!/bin/sh
#/etc/apm/resume.d/89omnewrotate
echo ‘omnr resume’ >> /home/root/omnr.log
omnr=$(pidof omnewrotate)
#echo $omnr
if [ “$omnr” ]; then
echo ‘omnr allready running’ >> /home/root/omnr.log
else
echo ‘omnr not running, trying to start’ >> /home/root/omnr.log
omnewrotate&
fi
by reading the link, perhaps it was just because of the missing #!/bin/sh….
yop this works fine
#!/bin/sh
#/etc/apm/suspend.d/11omnewrotate
killall omnewrotate
#!/bin/sh
#/etc/apm/resume.d/89omnewrotate
omnewrotate&
Yes, and I’ll be releasing 0.5.2 now 🙂