On Sun January 13 2008, Victor Lowther wrote: > Major changes: > * Renamed the hooks directory to sleep.d
I like this > * Generalized the hook-running infrastructure and modified > pm-powersave to use it instead of having its own copy. and this. > Comments, patches, flames, praise, etc. welcome! http://hg.fnordovax.org/pm-utils/file/4ec061123d4f/src/pm/functions 58 local bases=$(for f in $syshooks/*[!~] $phooks/*[!~]; 59 do echo ${f##*/} ; done | 60 sed 's/\*\[\!\^\]//g' |sort -n | uniq) I guess the "^" should be a "~" in the sed regular expression. I do not know, but is there no nicer solution to implement the bash "nullglob" feature? Repeating the pathname-expansion pattern with a lot of backslashes for sed. http://hg.fnordovax.org/pm-utils/file/4ec061123d4f/pm/sleep.d/zzz echo -e "99video\n99999suspend" | sort -n does work here as expected in bash. But zzz is a funny name in this context. :-) http://hg.fnordovax.org/pm-utils/file/4ec061123d4f/pm/functions 215 # reload all the modules in no particular order. 216 modreload() 217 { 218 for x in /var/run/pm-suspend/module:* ; do 219 [ -f "${x}" ] && modprobe "${x##*:}" >/dev/null 2>&1 220 done 221 } Here it would be a little nice to have the nullglob feature, too. Also I like speaking variable names for than "x", e.g. "module". Regards, Till
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Pm-utils mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/pm-utils
