forked from extern/shorewall_code
Use -h rather than -L for checking a symlink
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
1fa77ac470
commit
d829093caa
@ -3864,7 +3864,7 @@ noiptrace_command() {
|
||||
verify_firewall_script() {
|
||||
if [ ! -f $g_firewall ]; then
|
||||
echo " ERROR: $g_product is not properly installed" >&2
|
||||
if [ -L $g_firewall ]; then
|
||||
if [ -h $g_firewall ]; then
|
||||
echo " $g_firewall is a symbolic link to a" >&2
|
||||
echo " non-existant file" >&2
|
||||
else
|
||||
|
@ -60,7 +60,7 @@ mywhich() {
|
||||
remove_file() # $1 = file to remove
|
||||
{
|
||||
if [ -n "$1" ] ; then
|
||||
if [ -f $1 -o -L $1 ] ; then
|
||||
if [ -f $1 -o -h $1 ] ; then
|
||||
rm -f $1
|
||||
echo "$1 Removed"
|
||||
fi
|
||||
@ -84,7 +84,7 @@ remove_file_with_wildcard() # $1 = file with wildcard to remove
|
||||
if [ -d $f ] ; then
|
||||
rm -rf $f
|
||||
echo "$f Removed"
|
||||
elif [ -f $f -o -L $f ] ; then
|
||||
elif [ -f $f -o -h $f ] ; then
|
||||
rm -f $f
|
||||
echo "$f Removed"
|
||||
fi
|
||||
|
@ -151,7 +151,7 @@ fi
|
||||
|
||||
remove_file ${SBINDIR}/$PRODUCT
|
||||
|
||||
if [ -L ${SHAREDIR}/$PRODUCT/init ]; then
|
||||
if [ -h ${SHAREDIR}/$PRODUCT/init ]; then
|
||||
if [ $HOST = openwrt ]; then
|
||||
if [ $configure -eq 1 ] && /etc/init.d/$PRODUCT enabled; then
|
||||
/etc/init.d/$PRODUCT disable
|
||||
|
@ -151,7 +151,7 @@ fi
|
||||
|
||||
remove_file ${SBINDIR}/$PRODUCT
|
||||
|
||||
if [ -L ${SHAREDIR}/$PRODUCT/init ]; then
|
||||
if [ -h ${SHAREDIR}/$PRODUCT/init ]; then
|
||||
FIREWALL=$(readlink -m -q ${SHAREDIR}/$PRODUCT/init)
|
||||
elif [ -n "$INITFILE" ]; then
|
||||
FIREWALL=${INITDIR}/${INITFILE}
|
||||
|
Loading…
Reference in New Issue
Block a user