From bf3c71f65b048c0c69a1602d059ab6b51f6418aa Mon Sep 17 00:00:00 2001 From: CyberLeo Date: Thu, 25 Feb 2010 12:19:29 -0600 Subject: [PATCH] Tweak to handle multiple path elements in $local_startup --- bin/rc | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/bin/rc b/bin/rc index e97d70a..96160c7 100755 --- a/bin/rc +++ b/bin/rc @@ -31,9 +31,17 @@ pebkac() { exit 1 } +# All startup directories +rc_dirs() { + for dir in /etc/rc.d ${local_startup} + do + [ -d "${dir}" ] && echo "${dir}"'/*' + done +} + # List all available rc scripts rc_list() { - ls -1 /etc/rc.d/* "${local_startup}"/* | egrep -v '/(DAEMON|FILESYSTEMS|LOGIN|NETWORKING|SERVERS)$' | sort + ls -1 $(rc_dirs) | egrep -v '/(DAEMON|FILESYSTEMS|LOGIN|NETWORKING|SERVERS)$' | sort } # Get the status of one script -- 2.42.0