From 626037f6043596f21511b76b088dca86fc079f42 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Thu, 14 Feb 2008 19:53:03 -0600 Subject: 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 --- functions | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'functions') 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 } -- cgit v1.2.3