From d2d72cb5c174e0873530773a1e371c2310809c6b Mon Sep 17 00:00:00 2001 From: Richard Hughes Date: Sat, 29 Dec 2007 11:56:31 +0000 Subject: 2007-12-29 Richard Hughes * 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 , many thanks. --- src/pm-powersave | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/pm-powersave') 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/*[^~]" -- cgit v1.2.3