summaryrefslogtreecommitdiff
path: root/src/pm-powersave
diff options
context:
space:
mode:
authorRichard Hughes <richard@hughsie.com>2007-12-29 11:56:31 +0000
committerRichard Hughes <richard@hughsie.com>2007-12-29 11:56:31 +0000
commitd2d72cb5c174e0873530773a1e371c2310809c6b (patch)
tree85354fe11c7792a241f2debdc42c9e56fd724cf2 /src/pm-powersave
parent003f29807f418cd4bd14fb51569b5b95a2d9dfa5 (diff)
2007-12-29 Richard Hughes <richard@hughsie.com>
* pm/functions: * src/pm-powersave: Red Hat Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=302401 (Issue 1 in the bug report) This patch makes sure that the nullglob option is set. This makes sure that the result of a filename expansion is empty, when the pattern does not match. From Till Maas <opensource@till.name>, many thanks.
Diffstat (limited to 'src/pm-powersave')
-rwxr-xr-xsrc/pm-powersave4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/pm-powersave b/src/pm-powersave
index e2b2732..93841ae 100755
--- a/src/pm-powersave
+++ b/src/pm-powersave
@@ -24,6 +24,10 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
+# set nullglob to make glob results empty in case the pattern does not
+# match any files
+shopt -s nullglob
+
find_powerd_files()
{
flist="/etc/pm/power.d/*[^~] /usr/lib/pm-utils/power.d/*[^~]"