[Pm-utils] POSIXification of pm-utils
Till Maas
opensource at till.name
Sun Jan 13 10:08:19 PST 2008
On Sun January 13 2008, Victor Lowther wrote:
> Comments, patches, flames, praise, etc. welcome!
http://hg.fnordovax.org/pm-utils/file/73184527be5d/pm/functions
66 take_suspend_lock()
67 {
68 # file creation and reading is not atomic.
69 # Directory creation is.
70 try_lock "$LOCKDIR" || return 1
71 VT=$(fgconsole)
The comments here should go to line 60, where they make more sense, imho.:
56 release_lock()
57 {
58 # $1 = directory used as the lock directory
59 # is it our directory?
60 ! [ -d "$1" -a $(cat "$1/pid") -eq $$ ] || return 1
61 rm -rf "$1"
62 return $?
63 }
Btw. I guess this directory was created by accident:
http://hg.fnordovax.org/pm-utils/file/73184527be5d/src/pm/
I also noticed you changed the location of on_ac_power, pm-action,
pm-is-supported and pm-powersave, maybe you then also want to move the
installed pm-action to /usr/lib/libexec/ instead, because afaik this is where
executables that are not meant to be executed by a user, should go.
Regards,
Till
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 827 bytes
Desc: This is a digitally signed message part.
Url : http://lists.freedesktop.org/archives/pm-utils/attachments/20080113/b73fd3df/attachment.pgp
More information about the Pm-utils
mailing list