ac_laptop | joerg: ok I put the script into /usr/bin | 00:01 |
---|---|---|
ac_laptop | it doesn't seem to change anything though, the service is not running after a reboot | 00:02 |
ac_laptop | oh, right | 00:14 |
ac_laptop | upstart doesn't seem to be aware of the existence of my script | 00:14 |
ac_laptop | I thought there was a conversion layer like with systemd | 00:14 |
sixwheeledbeast | busybox may mean some of the programs you call fail | 00:15 |
sixwheeledbeast | basic upstart scripts are normally laid out:- description; author; start on; script; end script; | 00:17 |
ac_laptop | I see plenty of scripts under /etc/init.d , how does maemo start those ? | 00:18 |
sixwheeledbeast | it may read them fine and it's something else. I only ever used upstart back when I made stuff for maemo. there are several errors i pointed out about it will likely ignore the file completely with errors | 00:21 |
sixwheeledbeast | busybox date doesn't have -I flag for example. | 00:22 |
sixwheeledbeast | probably more. | 00:22 |
sixwheeledbeast | /etc/event.d | 00:25 |
joerg | messybox is nasty, lots of stuff doesn't work as you think it should | 00:26 |
joerg | sleep 1m only one of them | 00:26 |
ac_laptop | sixwheeledbeast: oh, ok , I was looking for some /etc/init/ directory | 00:28 |
joerg | IroN900:/home/user# busybox date -Is | 00:28 |
joerg | BusyBox v1.10.2 (Debian 3:1.10.2.legal-1osso31+0cssu0) multi-call binary | 00:28 |
joerg | Usage: date [OPTION]... [MMDDhhmm[[CC]YY][.ss]] [+FORMAT] | 00:28 |
joerg | IroN900:/home/user# busybox sleep 1m | 00:28 |
joerg | sleep: invalid number '1m' | 00:28 |
ac_laptop | I might have installed something like the gnu coreutils when I bought the device because date -Is works | 00:29 |
sixwheeledbeast | and then who knows if messybox-power was installed and something else happens... | 00:29 |
ac_laptop | I also have bash4 | 00:29 |
joerg | https://termbin.com/f5qq | 00:29 |
sixwheeledbeast | how to make messybox more messy | 00:29 |
joerg | IroN900:/home/user# which date | 00:31 |
joerg | /usr/bin/gnu/date | 00:31 |
joerg | IroN900:/home/user# file `which date` | 00:31 |
joerg | /usr/bin/gnu/date: symbolic link to `/opt/maemo/usr/bin/gnu/date' | 00:31 |
sixwheeledbeast | but you don't call bash and it's not the default shell so more messy | 00:31 |
joerg | ^^^ | 00:31 |
bencoh | to be fair, the s/m/d thing doesn't seem to be standard according to the opengroup anyway | 00:31 |
bencoh | https://pubs.opengroup.org/onlinepubs/000095399/utilities/sleep.html | 00:31 |
bencoh | here is the latest version: https://pubs.opengroup.org/onlinepubs/9699919799/utilities/sleep.html | 00:32 |
joerg | IroN900:/home/user# echo $BASH_VERSION | 00:32 |
joerg | 3.2.33(2)-release | 00:32 |
sixwheeledbeast | there is bash4.2 (well 2 versions of 4.2 actually) | 00:33 |
sixwheeledbeast | bash4-opt and bash4 | 00:33 |
ac_laptop | I don't want to make you unnecessarily scratch your head over this guys | 00:34 |
joerg | IroN900:~# exit | 00:34 |
joerg | ~ # date -Is | 00:34 |
joerg | BusyBox v1.10.2 (Debian 3:1.10.2.legal-1osso31+0cssu0) multi-call binary | 00:34 |
joerg | Usage: date [OPTION]... [MMDDhhmm[[CC]YY][.ss]] [+FORMAT] | 00:34 |
ac_laptop | all I need is to log the output of lshal -u /org/freedesktop/Hal/devices/bme regularly so I can know what is up with my battery / power management | 00:35 |
ac_laptop | :) | 00:35 |
bencoh | ac_laptop: you might want to have a look at the bq27200.sh script for that purpose | 00:36 |
sixwheeledbeast | ^ | 00:36 |
bencoh | here is a copy: https://github.com/maemo-leste/bugtracker/files/2332967/bq27200.txt | 00:39 |
joerg | http://wiki.maemo.org/User:Joerg_rw/tools | 00:39 |
joerg | http://reisenweber.net/maemo5/usr/local/sbin/ | 00:41 |
ac_laptop | I mean in fremantle | 00:41 |
bencoh | ac_laptop: yeah, me too | 00:41 |
ac_laptop | I need to compare the battery stats of fremantle with the ones of leste to see what's going on | 00:41 |
joerg | my server is only fremantle (well and a tad of harmattan) | 00:42 |
joerg | http://reisenweber.net/maemo5/usr/local/sbin/bq27200.sh | 00:42 |
bencoh | (the fact I gave you a link from leste's github is just because that's the first source I found for that script, but it definitely comes from fremantle's era) | 00:42 |
joerg | I *guess* my last URL is one of the earliest incarnations of bq27000.sh | 00:43 |
joerg | iirc I got it from speedevil and modified it a tad. http://reisenweber.net/maemo5/usr/local/sbin/bq27k-detail2 predates it though, it's based on my implementation of this stuff fir Openmoko Neo | 00:44 |
ac_laptop | ok I'm going to use this one | 00:44 |
sixwheeledbeast | https://wiki.maemo.org/N900_Hardware_Power_Consumption | 00:45 |
ac_laptop | should I put it in /usr/bin and make an upstart service file ? | 00:45 |
joerg | #!/bin/bash | 00:46 |
joerg | # NEEDS BASH! won't run on busybox, sorry | 00:46 |
joerg | # v1.2 (c) 2009 2011-10-20 DocScrutinizer | 00:46 |
joerg | # | 00:46 |
joerg | # this script decodes the smartbattery BQ27000 Coulomb-Counter | 00:46 |
joerg | # v1.2 tries to deal with sysfs path changes on OM kernels, and supports N900 directly | 00:46 |
joerg | ac_laptop: I *think* upstart is not what you want. There's a .desktop file way to implement autostart apps | 00:48 |
ac_laptop | the bq27200.sh script needs i2cget | 00:49 |
sixwheeledbeast | does it really need to start automatically? I'd just run manually, it's not something you will want permanent | 00:49 |
ac_laptop | sixwheeledbeast: well for now I can afford to run it by hand yes | 00:51 |
joerg | I can't remember where those damn *.desktop files are | 00:52 |
joerg | thought I'd find them in /home/user/.local/share/applications/hildon/* but no | 00:53 |
ac_laptop | but there are some cases on leste where I boot the device, then it believes the battery is at 0%, and shuts down. I'm not sure if this happens on fremantle too, it's not regular | 00:53 |
ac_laptop | ok so apt-get install i2c-tools should not be done from an SSH connexion | 00:54 |
ac_laptop | because it shows a popup requiring an agreement | 00:55 |
ac_laptop | ok the bq27200.sh script works fine | 00:55 |
sixwheeledbeast | joerg: /usr/share/applications/hildon/ ? | 00:56 |
joerg | https://termbin.com/a2rl | 00:56 |
joerg | yeah | 00:56 |
ac_laptop | thanks ! | 00:58 |
joerg | yw. and yes, you need i2get | 00:58 |
ac_laptop | joerg: your .desktop does not autostart, right ? | 01:11 |
joerg | no, but I'm getting closer: /etc/X11/Xsession.d/ | 01:12 |
joerg | place some script in there, 80-up range so it gets executed late | 01:17 |
ac_laptop | the sudo /usr/bin/bq27200.sh 60|tee -a /home/user/MyDocs/syslogs/bq.log works on the command line | 01:21 |
ac_laptop | but there are problems with /usr/bin/osso-xterm 'sudo /usr/bin/bq27200.sh 60|tee -a /home/user/MyDocs/syslogs/bq.log' | 01:22 |
ac_laptop | I don't get anything written in /home/user/MyDocs/syslogs/bq.log | 01:22 |
joerg | I bet there needs to be made some sudo entry | 01:23 |
joerg | here's autostart pretty https://termbin.com/kb05 | 01:24 |
joerg | I admit I might have messed up the `tee -a /home/user/MyDocs/syslogs/bq.log` part, maybe never checked if it's working | 01:28 |
ac_laptop | maybe osso-xterm ignores the pipe ? | 01:31 |
joerg | possibly | 01:31 |
joerg | I edited this stuff years after initially creating it (without pipe and tee): -rw-r--r-- 1 root root 313 2018-09-28 13:14 /usr/share/applications/hildon/bq27k.desktop | 01:32 |
joerg | sorry | 01:32 |
ac_laptop | yeah that was it, osso-xterm ignores the pipe | 01:40 |
ac_laptop | wrapping it in an other script, it works | 01:40 |
Generated by irclog2html.py 2.17.0 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!