diff options
author | delphij <delphij@FreeBSD.org> | 2014-07-01 15:50:34 +0000 |
---|---|---|
committer | delphij <delphij@FreeBSD.org> | 2014-07-01 15:50:34 +0000 |
commit | efafd0ece4e4640ea96da5df6705bff5dfc58dec (patch) | |
tree | 176dcc9d22251ec6cb811c27c92d0fb93f48477e /usr.sbin/service | |
parent | b6530ab0a75df248778a68ad2c476a217ce76392 (diff) | |
download | FreeBSD-src-efafd0ece4e4640ea96da5df6705bff5dfc58dec.zip FreeBSD-src-efafd0ece4e4640ea96da5df6705bff5dfc58dec.tar.gz |
MFC r267493:
Fix two issues:
- Check for rc.d directory's existence before traversing
it;
- Don't output * when rc.d directory is empty.
PR: bin/190665
Submitted by: Oleg Ginzburg <olevole olevole ru> (with changes)
Diffstat (limited to 'usr.sbin/service')
-rwxr-xr-x | usr.sbin/service/service.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.sbin/service/service.sh b/usr.sbin/service/service.sh index cf181fa..bd5a95c 100755 --- a/usr.sbin/service/service.sh +++ b/usr.sbin/service/service.sh @@ -109,7 +109,7 @@ fi if [ -n "$LIST" ]; then for dir in /etc/rc.d $local_startup; do [ -n "$VERBOSE" ] && echo "From ${dir}:" - cd $dir && for file in *; do echo $file; done + [ -d ${dir} ] && /bin/ls -1 ${dir} done exit 0 fi |