FS#13342 - [pm-utils 1.2.4-1] -- service handling functions wrong again

Attached to Project: Arch Linux
Opened by Fnord Popos (noddy) - Tuesday, 17 February 2009, 16:25 GMT
Last edited by Thayer Williams (thayer) - Wednesday, 18 February 2009, 05:30 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Thayer Williams (thayer)
Architecture All
Severity Low
Priority Normal
Reported Version None
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

Ok, I'm starting to realize no arch dev uses local service-handling hooks with pm-utils, but come on. At least make a mental note: when an update comes, just make sure the few lines of bash in /usr/lib/pm-utils/functions cater to the arch layout.

These don't:

~ $ diff -u /usr/lib/pm-utils/functions /usr/lib/pm-utils/functions.pacnew
--- /usr/lib/pm-utils/functions 2009-02-17 17:05:50.981248895 +0100
+++ /usr/lib/pm-utils/functions.pacnew 2009-02-15 20:28:00.000000000 +0100
@@ -129,7 +129,7 @@
if ! command_exists service; then
service()
{
- for svc in "/etc/init.d/$1" "/etc/rc.d/$1"; do #lsb, then slack
+ for svc in "/etc/init.d/$1" "/etc/rc.d/rc.$1"; do #lsb, then slack
[ -x "$svc" ] && { shift; "$svc" "$@"; return $?; }
done
# this only happens if we did not find the service

We don't prefix the service scripts with "rc.", amitirite?

Additional info:
* package version(s)

pm-utils 1.2.4-1 and two releases before.


Steps to reproduce:

Make a script to, say, disable sensors and kill fan handling -- because the driver is not sleep resistant -- and build it upon helpers in /usr/lib/pm-utils/functions because they provide state management and are generally convenient. Update pm-utils. Scratch head. Every time.
This task depends upon

Closed by  Thayer Williams (thayer)
Wednesday, 18 February 2009, 05:30 GMT
Reason for closing:  Fixed
Comment by Thayer Williams (thayer) - Wednesday, 18 February 2009, 05:29 GMT
You're right, I don't use the service function. I don't even use pm-utils, but...is it just me or is your patch backwards? heh

At any rate, thanks for pointing that out. Fixed!

Loading...