From 275296779b354a2c26fb06475d4402a78a1e397f Mon Sep 17 00:00:00 2001 From: Jan-Tarek Butt <buttjantarek@googlemail.com> Date: Sat, 2 May 2015 21:52:14 +0200 Subject: [PATCH] fix a conflict with the package opkg --- opkgconfig/Makefile | 6 +++++- .../files/{ => lib/ffnw/opkgconfig}/opkg.conf | 0 .../files/lib/ffnw/opkgconfig/opkgconfig.sh | 15 +++++++++++++++ opkgconfig/files/lib/gluon/cron/opkgconfig | 1 + 4 files changed, 21 insertions(+), 1 deletion(-) rename opkgconfig/files/{ => lib/ffnw/opkgconfig}/opkg.conf (100%) create mode 100644 opkgconfig/files/lib/ffnw/opkgconfig/opkgconfig.sh create mode 100644 opkgconfig/files/lib/gluon/cron/opkgconfig diff --git a/opkgconfig/Makefile b/opkgconfig/Makefile index ed05093..992cd90 100644 --- a/opkgconfig/Makefile +++ b/opkgconfig/Makefile @@ -29,7 +29,11 @@ define Build/Compile endef define Package/ffnw-opkgconfig/install - $(INSTALL_CONF) files/opkg.conf $(1)/etc/opkg.conf + $(INSTALL_DIR) $(1)/lib/gluon/cron/ + $(INSTALL_DATA) files/lib/gluon/cron/opkgconfig $(1)/lib/gluon/cron/opkgconfig + $(INSTALL_DIR) $(1)/lib/ffnw/opkgconfig/ + $(INSTALL_BIN) files/lib/ffnw/opkgconfig/opkgconfig.sh $(1)/lib/ffnw/opkgconfig/ + $(INSTALL_CONF) files/lib/ffnw/opkgconfig/opkg.conf $(1)/lib/ffnw/opkgconfig/ endef $(eval $(call BuildPackage,ffnw-opkgconfig)) diff --git a/opkgconfig/files/opkg.conf b/opkgconfig/files/lib/ffnw/opkgconfig/opkg.conf similarity index 100% rename from opkgconfig/files/opkg.conf rename to opkgconfig/files/lib/ffnw/opkgconfig/opkg.conf diff --git a/opkgconfig/files/lib/ffnw/opkgconfig/opkgconfig.sh b/opkgconfig/files/lib/ffnw/opkgconfig/opkgconfig.sh new file mode 100644 index 0000000..2de889f --- /dev/null +++ b/opkgconfig/files/lib/ffnw/opkgconfig/opkgconfig.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +cleanup () { + rm -rf /lib/gluon/cron/opkgconfig + rm -rf /lib/ffnw/opkgconfig + } + +grep -Fxvf /etc/opkg.conf /lib/ffnw/opkgconfig/opkg.conf > /dev/null +if [ $? -eq 0 ]; then + mv /lib/ffnw/opkgconfig/opkg.conf /etc/opkg.conf + cleanup +else + cleanup +fi + diff --git a/opkgconfig/files/lib/gluon/cron/opkgconfig b/opkgconfig/files/lib/gluon/cron/opkgconfig new file mode 100644 index 0000000..0db3384 --- /dev/null +++ b/opkgconfig/files/lib/gluon/cron/opkgconfig @@ -0,0 +1 @@ +*/5 * * * * sh /lib/ffnw/opkgconfig/opkgconfig.sh -- GitLab