Added logic to handle empty deny/allow directories and entries.
1 parent f86ce3c commit 83bea77cb2d1f0b491fab6cd6603e30c11e827c7
@tundra tundra authored on 3 May 2006
Showing 1 changed file
View
36
rebuild-hosts.allow.sh
#
# Copyright (c) 2006 TundraWare Inc., Des Plaines, IL USA
# All Rights Reserved
 
RCSID='$Id: rebuild-hosts.allow.sh,v 1.102 2006/05/03 05:15:30 tundra Exp $'
RCSID='$Id: rebuild-hosts.allow.sh,v 1.103 2006/05/03 06:24:24 tundra Exp $'
 
BASE="/usr/local/etc/tperimeter"
EPILOGUE=${BASE}/epilogue
PROLOGUE=${BASE}/prologue
then
cd $1
for x in *
do
echo -n $x": "
cd $x
for y in *
do
echo -n $y" "
done
echo " :$2"
cd ..
if [ $x != '*' ]
then
cd $x
list=""
for y in *
do
if [ $y != '*' ]
then
list=${list}${y}" "
fi
done
if [ "$list" ]
then
echo "$x: $list :$2"
fi
cd ..
fi
done
fi
}
# End Of 'BuildEntries()'