From b7f267fab649e6a25a8d115bbb1a74e0270f30f9 Mon Sep 17 00:00:00 2001 From: Florian Fainelli Date: Thu, 14 Aug 2008 22:16:22 +0000 Subject: [PATCH] Move directory creation to postinst script (#3841) SVN-Revision: 12314 --- net/iptraf/Makefile | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/net/iptraf/Makefile b/net/iptraf/Makefile index 874f309713..33a0acfa19 100644 --- a/net/iptraf/Makefile +++ b/net/iptraf/Makefile @@ -36,6 +36,13 @@ define Package/iptraf/description and LAN station packet and byte counts. endef +define Package/iptraf/postinst +#!/bin/sh +if [ -z "$${IPKG_INSTROOT}" ]; then + mkdir -p $${IPKG_INSTROOT}/var/log/iptraf $${IPKG_INSTROOT}/var/run/iptraf $${IPKG_INSTROOT}/var/lib/iptraf/ +fi +endef + define Build/Compile $(MAKE) -C $(PKG_BUILD_DIR)/src \ $(TARGET_CONFIGURE_OPTS) \ @@ -52,9 +59,6 @@ endef define Package/iptraf/install $(INSTALL_DIR) $(1)/usr/bin $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/iptraf $(1)/usr/bin/ - $(INSTALL_DIR) $(1)/var/lib/iptraf/ - echo "$(PKG_VERSION)" > $(1)/var/lib/iptraf/version - $(INSTALL_DIR) $(1)/var/log/iptraf $(1)/var/run/iptraf endef $(eval $(call BuildPackage,iptraf)) -- 2.30.2