Keyboard light enabler is almost ready. Q: What can go into the firmware, what to put into PND?


hmc

Active Member
Joined
Dec 19, 2011
Messages
787
Location
Bavaria, Germany
A question to those people here, who are responsible to decide what to put into the official firmware:
 

My keyboard light enabler plugin for configbutton and the scripts around it are ready and work well.

Before I create a PND: 

Besides the actual configbutton plugin, there are two scripts involved:

- New script /usr/pandora/scripts/op_kbd_light.sh (that does the actual light control)

- Modified script /usr/pandora/scripts/op_power.sh (that cares about the light toggle when closing the lid, going into standby and waking up etc.)

And the /etc/sudoers.d/50_openpandora needs to be adapted, so that op_kbd_light.sh can do its work.

If I create an installer PND, that PND would need to add the op_kbd_light.s, replace the op_power.sh script, and append a line to the sudoers file.

The alternative would be to include those two script and the sudoers change in the next firmware update and make them part of the standard firmware. They don't do any harm at all when present without a keyboard light (even the op_power.sh changes do not affect anything at all, if the user did not explicitly enable the keyboard light via the plugin before). And it's only about 2kB of data that's added.

Then I'd only need to put the actual plugin into the installer PND.

I am a little bit afraid of letting a PND mess around with central scripts and especially the sudoers file. I'm even unsure if this is possible at all. So my preference would be to include the changes into firmware. But on the other hand only a small amount of users will ever need this stuff, so...

What's your preferred solution?

Who actually decides, if new stuff goes into the firmware or not?
 
Last edited by a moderator:
We've already decided not to put this in because some people connect other things like haptic motors and this would screw them.

There is like 1 person out of 1000 who does such mods anyway, so not worth adding things that way below 1% of people can use, and it will only serve to confuse all the others.

I think .pnd is best here:

- you don't have to edit /etc/sudoers.d/50_openpandora , just add a new file to /etc/sudoers.d/

- /usr/pandora/scripts/op_power.sh could be modified to call additional script when it exists, something like:

  if test -x /usr/pandora/scripts/op_power_custom.sh; then . /usr/pandora/scripts/op_power_custom.sh ; fi

we could take such change to main firmware, and your .pnd would just install /usr/pandora/scripts/op_power_custom.sh without touching op_power.sh, making it compatible with all future updates.
 
Hi notaz,

okay, good ideas, let's do it that way.

Re. your proposed change to op_power.sh: Should op_power_custom.sh contain all the code that's now in op_power.sh and op_power.sh calls the _custom variant and quits then, or should op_power.sh call op_power_custom.sh in each of its functions to execute optional additional code in _custom for each function?

Only in the latter variant updates of op_power.sh in the firmware would survive an installation of the keyboard light stuff. Otherwise, updates of op_power.sh would be replaced by the potentially obsolete code in the op_power_custom.sh in my PND.
 
Back
Top