[Pm-utils] Speaking about the new layout...
pjones at redhat.com
Fri Mar 16 09:41:20 PDT 2007
On Fri, 2007-03-16 at 17:29 +0100, Stefan Seyfried wrote:
> ...which seems to work quite well, but one question popped up:
> What do we recommend to users who ask "how do i disable the $FOO hook"?
> "chmod -x /usr/lib/pm-utils/...." does not sound good, since this is not
> the location for admin-defined stuff.
I already thought of this before we switched ;)
The code in find_sleepd_hooks (with some minor reformatting for email)
bases=$(for file in $flist ; do echo $(basename $file) ; done | sort -n)
for base in $bases ; do
if [ -e "/etc/pm/sleep.d/$base" ]; then
if [ -x "/etc/pm/sleep.d/$base" ]; then
elif [ -x "/usr/lib/pm-utils/sleep.d/$base" ]; then
Which is to say that if /etc/pm/sleep.d/$base exists, we won't use a
script with same name in /usr/lib/pm-utils/sleep.d/ . But if the
sleep.d variant isn't executable, we won't use it _either_.
Which is to say, the simple way to stop $FOO from running is:
More information about the Pm-utils