diff options
author | delphij <delphij@FreeBSD.org> | 2014-06-15 05:07:01 +0000 |
---|---|---|
committer | delphij <delphij@FreeBSD.org> | 2014-06-15 05:07:01 +0000 |
commit | d53a37e6beac8da65a9391b8be3142e093910988 (patch) | |
tree | 7538e9225a172ff2f7afab45016da9e22ffc03e6 /usr.sbin/service/service.sh | |
parent | c2a9bacdac64a4b9f2257d94b80bff5e6cfb3851 (diff) | |
download | FreeBSD-src-d53a37e6beac8da65a9391b8be3142e093910988.zip FreeBSD-src-d53a37e6beac8da65a9391b8be3142e093910988.tar.gz |
Fix two issues:
- Check for rc.d directory's existence before traversing
it;
- Don't output * when rc.d directory is empty.
PR: conf/190665
Submitted by: Oleg Ginzburg <olevole olevole ru> (with changes)
MFC after: 2 weeks
Diffstat (limited to 'usr.sbin/service/service.sh')
-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 8c12b89..b5fd607 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 |