diff --git a/OpenWRT/Makefile b/OpenWRT/Makefile index b62948d..b5cbffc 100644 --- a/OpenWRT/Makefile +++ b/OpenWRT/Makefile @@ -1,10 +1,12 @@ include $(TOPDIR)/rules.mk +X_DOLLAR:=$$ +X_SOURCE_DIR:=$(CURDIR)/source + PKG_NAME:=cronosagent PKG_VERSION:=$(shell grep -o -E '[0-9]+' $(CURDIR)/source/Version.h) PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_BUILD_DEPENDS:= -X_SOURCE_DIR:=$(CURDIR)/source include $(INCLUDE_DIR)/package.mk @@ -52,10 +54,10 @@ define Package/cronosagent/postinst /etc/init.d/cronosagent start grep cronosagent /etc/crontabs/root > /dev/null -if [ "$?" -eq "1" ] +if [ "$(X_DOLLAR)?" -eq "1" ] then cat << EOF >> /etc/crontabs/root -*/10 * * * * test -n "$(ls /etc/rc.d/S??cronosagent)" -a -z "$(pidof cronosagent)" && /etc/init.d/cronosagent start +*/10 * * * * test -n "$(X_DOLLAR)(ls /etc/rc.d/S??cronosagent)" -a -z "$(X_DOLLAR)(pidof cronosagent)" && /etc/init.d/cronosagent start EOF fi