diff --git a/build.sh b/build.sh index 1f00f518..e4379043 100755 --- a/build.sh +++ b/build.sh @@ -460,8 +460,10 @@ EOF #!/bin/sh [ -n "${IPKG_INSTROOT}" ] && exit 0 [ "$1" = "upgrade" ] && exit 0 -[ "$1" != "remove" ] && [ "$1" != "purge" ] && [ -n "$1" ] && exit 0 -if [ -f /var/run/tachyon/component-actions/action.lock ] || [ -f /tmp/run/tachyon/component-actions/action.lock ]; then +if [ "$1" != "remove" ] && [ "$1" != "purge" ]; then + exit 0 +fi +if [ -e /var/run/tachyon/component-action.lock ] || [ -e /tmp/run/tachyon/component-action.lock ] || [ -e /var/run/tachyon/component-actions/action.lock ] || [ -e /tmp/run/tachyon/component-actions/action.lock ]; then exit 0 fi rm -f /www/cgi-bin/tachyon-agent /etc/hotplug.d/iface/99-tachyon-wan-monitor 2>/dev/null || true @@ -522,8 +524,10 @@ EOF #!/bin/sh [ -n "${IPKG_INSTROOT}" ] && exit 0 [ "$1" = "upgrade" ] && exit 0 -[ "$1" != "remove" ] && [ "$1" != "purge" ] && [ -n "$1" ] && exit 0 -if [ -f /var/run/tachyon/component-actions/action.lock ] || [ -f /tmp/run/tachyon/component-actions/action.lock ]; then +if [ "$1" != "remove" ] && [ "$1" != "purge" ]; then + exit 0 +fi +if [ -e /var/run/tachyon/component-action.lock ] || [ -e /tmp/run/tachyon/component-action.lock ] || [ -e /var/run/tachyon/component-actions/action.lock ] || [ -e /tmp/run/tachyon/component-actions/action.lock ]; then exit 0 fi rm -f /var/luci-indexcache* /tmp/luci-indexcache* /tmp/luci-modulecache/* 2>/dev/null || true @@ -804,7 +808,7 @@ EOF #!/bin/sh [ -n "${IPKG_INSTROOT}" ] && exit 0 [ -f /usr/bin/tachyon ] && exit 0 -if [ -f /var/run/tachyon/component-actions/action.lock ] || [ -f /tmp/run/tachyon/component-actions/action.lock ]; then +if [ -e /var/run/tachyon/component-action.lock ] || [ -e /tmp/run/tachyon/component-action.lock ] || [ -e /var/run/tachyon/component-actions/action.lock ] || [ -e /tmp/run/tachyon/component-actions/action.lock ]; then exit 0 fi rm -f /www/cgi-bin/tachyon-agent /etc/hotplug.d/iface/99-tachyon-wan-monitor 2>/dev/null || true diff --git a/luci-app-tachyon/Makefile b/luci-app-tachyon/Makefile index f2068efa..e1361b6e 100644 --- a/luci-app-tachyon/Makefile +++ b/luci-app-tachyon/Makefile @@ -38,9 +38,11 @@ define Package/$(PKG_NAME)/postrm [ -n "$${IPKG_INSTROOT}" ] && exit 0 [ "$$1" = "upgrade" ] && exit 0 -[ "$$1" != "remove" ] && [ "$$1" != "purge" ] && [ -n "$$1" ] && exit 0 +if [ "$$1" != "remove" ] && [ "$$1" != "purge" ]; then + exit 0 +fi -if [ -f /var/run/tachyon/component-actions/action.lock ] || [ -f /tmp/run/tachyon/component-actions/action.lock ]; then +if [ -e /var/run/tachyon/component-action.lock ] || [ -e /tmp/run/tachyon/component-action.lock ] || [ -e /var/run/tachyon/component-actions/action.lock ] || [ -e /tmp/run/tachyon/component-actions/action.lock ]; then exit 0 fi diff --git a/tachyon/Makefile b/tachyon/Makefile index dc8957c1..76bb1241 100644 --- a/tachyon/Makefile +++ b/tachyon/Makefile @@ -157,9 +157,11 @@ define Package/tachyon/postrm [ -n "$${IPKG_INSTROOT}" ] && exit 0 [ "$$1" = "upgrade" ] && exit 0 -[ "$$1" != "remove" ] && [ "$$1" != "purge" ] && [ -n "$$1" ] && exit 0 +if [ "$$1" != "remove" ] && [ "$$1" != "purge" ]; then + exit 0 +fi -if [ -f /var/run/tachyon/component-actions/action.lock ] || [ -f /tmp/run/tachyon/component-actions/action.lock ]; then +if [ -e /var/run/tachyon/component-action.lock ] || [ -e /tmp/run/tachyon/component-action.lock ] || [ -e /var/run/tachyon/component-actions/action.lock ] || [ -e /tmp/run/tachyon/component-actions/action.lock ]; then exit 0 fi