On Jan 13, 2008 12:08 PM, Till Maas <[EMAIL PROTECTED]> wrote: > 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 }
Moved. > Btw. I guess this directory was created by accident: > http://hg.fnordovax.org/pm-utils/file/73184527be5d/src/pm/ It is not present in my copy of the tree, and hasn't been since sometime yesterday evening. :) > 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. If I changed the location of where things were supposed to go during install, it was by accident. I have less than a days experience working with autotools, and the directory hierarchy I got from CVS was... interesting. I was forced to do a bit of surgery -- I suspect CVS and its horribly broken way of handling anything vaguely involving a file or directory move or rename is to blame. Anyone else think that moving away from CVS for source control is a good idea? I am partial to Mercurial, but any of the modern distributed source control systems would be lightyears better than CVS. > Regards, > Till -- Victor Lowther Ubuntu Certified Professional _______________________________________________ Pm-utils mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/pm-utils
