Skip to content

Commit

Permalink
Fixed lockfile removal
Browse files Browse the repository at this point in the history
  • Loading branch information
FriedZombie committed Jan 21, 2014
1 parent b2eb288 commit 64e6b62
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion gatekeeper/OpenWrt/80-gatekeeperUpdate
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@ if [ "$ACTION" = "ifup" ] && [ "$INTERFACE" = "${netIface}" ]; then
echo "${ip}" | grep -E '^(10\.|192\.168\.|172\.(1[6-9]|2[0-9]|3[01])\.)' > /dev/null && wanC=0 || wanC=1
if [ $wanC -eq 1 ]; then
touch "${ipFile}"
grep "${ip}" "${ipFile}" > /dev/null && return 0
grep "${ip}" "${ipFile}" > /dev/null
if [ $? -eq 0 ]; then
rm "${lockFile}"
return 0
fi
fi
/sbin/gatekeeperUpdate && {
[ $wanC -eq 1 ] && echo "${ip}" > "${ipFile}"
Expand Down

0 comments on commit 64e6b62

Please sign in to comment.