Subject: Re: rc, rc.subr, rc.conf, nfs-mounted /usr [was: Re: CVS commit:
To: Tim Rightnour <root@garbled.net>
From: Brian Baird <brb@brig.com>
List: tech-userlevel
Date: 01/13/2000 02:04:26
> Is there something other than grep that can be used in this peice of code?
sh is your friend... Change the existing code in rc from
conflist=`cd /etc; ls -1d etc.* 2>&1 | egrep -v 'current|default'`
for i in $conflist; do
name=`expr $i : 'etc\.\(.*\)' 2>&1`
if [ $name = $default ] ; then
echo -n "${spc}[${name}]"
else
echo -n "${spc}${name}"
fi
spc=" "
done
to
for i in /etc/etc.*; do
case $i in
*.current|*.default)
;;
*) name=`expr $i : '/etc/etc\.\(.*\)' 2>&1`
if [ "X$name" = "X$default" ] ; then
echo -n "${spc}[${name}]"
else
echo -n "${spc}${name}"
fi
spc=" "
;;
esac
done
--Brian;