aboutsummaryrefslogtreecommitdiff
path: root/functions
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2008-02-14 19:53:03 -0600
committerDan McGee <dan@archlinux.org>2008-02-14 19:53:03 -0600
commit626037f6043596f21511b76b088dca86fc079f42 (patch)
treedea54324dc2af737e998ad197677eecba0d3af97 /functions
parentccc90d4d211a61a21c835c1e51c807ddd485a136 (diff)
downloadinitscripts-626037f6043596f21511b76b088dca86fc079f42.tar.xz
functions:source_functions(): don't fail on empty dir
Instead of using globbing which will fail on an empty directory, use an ls call similar to other places in the initscripts which is not prone to failure. (See rc.single in the daemon shutdown for example.) Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'functions')
-rw-r--r--functions4
1 files changed, 2 insertions, 2 deletions
diff --git a/functions b/functions
index b55e507..32252f5 100644
--- a/functions
+++ b/functions
@@ -146,8 +146,8 @@ ck_daemon() {
source_functions() {
if [ -d /etc/rc.d/functions.d/ ]; then
- for f in /etc/rc.d/functions.d/*; do
- . $f
+ for f in $(ls /etc/rc.d/functions.d/); do
+ . /etc/rc.d/functions.d/$f
done
fi
}