[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Disable systemd script just by removing execute permission?



On 30/06/2022 12:09, Greg Wooledge wrote:
On Thu, Jun 30, 2022 at 11:30:25AM +0100, Ottavio Caruso wrote:
$ cat  /usr/lib/systemd/system-sleep/tlp
#!/bin/sh

# tlp - systemd suspend/resume hook
#
# Copyright (c) 2022 Thomas Koch <linrunner at gmx.net> and others.
# This software is licensed under the GPL v2 or later.

case $1 in
     pre)  tlp suspend ;;
     post) tlp resume  ;;
esac

I don't want to uninstall tlp altogether, so I have removed execute
permission from this script:

$ ls -l /usr/lib/systemd/system-sleep/tlp
-rw-r--r-- 1 root root 239 Feb  3 15:04 /usr/lib/systemd/system-sleep/tlp

Is this enough, or do I have to remove it altogether from
/usr/lib/systemd/system-sleep/  ?

Try It And See?


How? I mean, I've noticed that the weirdness have disappeared, but how do I test for sure that the script is not loaded?

--
Ottavio Caruso

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?


Reply to: