Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 1 Jul 2014 15:50:34 +0000 (UTC)
From:      Xin LI <delphij@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r268098 - stable/10/usr.sbin/service
Message-ID:  <201407011550.s61FoYpj048033@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: delphij
Date: Tue Jul  1 15:50:34 2014
New Revision: 268098
URL: http://svnweb.freebsd.org/changeset/base/268098

Log:
  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)

Modified:
  stable/10/usr.sbin/service/service.sh
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/usr.sbin/service/service.sh
==============================================================================
--- stable/10/usr.sbin/service/service.sh	Tue Jul  1 15:36:05 2014	(r268097)
+++ stable/10/usr.sbin/service/service.sh	Tue Jul  1 15:50:34 2014	(r268098)
@@ -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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201407011550.s61FoYpj048033>