Summary: | make sys-apps/slocate battery aware | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Daniel Troeder <daniel> |
Component: | [OLD] Core system | Assignee: | Gentoo's Team for Core System packages <base-system> |
Status: | RESOLVED FIXED | ||
Severity: | enhancement | CC: | gef.kornflakes |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Daniel Troeder
2010-04-01 10:42:00 UTC
Nice idea. About its implementation, on baselayout-2.0 systems, there is also /lib/rc/bin/on_ac_power from sys-apps/openrc (which doesn't require sys-power/pm-utils) ; baselayout-1.12* doesn't looks like it has such a function. your patch is reversed. but anyways, as Gef points out, ive pushed Roy to export a helper function specifically for cronjobs to leverage. that's the only thing i would use in cronjobs -- we're not going to start copying & pasting duplicate code all over the place. the way to do things though is: . /etc/init.d/functions.sh on_ac_power 2>/dev/null [ $? -eq 1 ] && exit 0 > your patch is reversed.
oops :D
Duplicate code is bad of course. Is it possible to check in an ebuild if we're on baselayout-2, and only then patch the cronjob with the three lines spanky suggests?
|