From e730272a7715c3d5c74c2f55c639d1ce9eac5a36 Mon Sep 17 00:00:00 2001 From: Sebastian Kemper Date: Mon, 12 Nov 2018 21:55:21 +0100 Subject: [PATCH] freeswitch-stable: move hotplug into main pkg There is no point in keeping the hotplug script in an extra package. Move it to the main package. The priority of the script is changed from 99 to 90 as the freeswitch init script uses the same. The postinstall script will check if 99-freeswitch exists. If it does a warning is displayed with the suggestion to uninstall the hotplug package. Signed-off-by: Sebastian Kemper --- net/freeswitch-stable/Makefile | 46 +++++++++++----------------------- 1 file changed, 14 insertions(+), 32 deletions(-) diff --git a/net/freeswitch-stable/Makefile b/net/freeswitch-stable/Makefile index 6c3d8f0..0dd4dcf 100644 --- a/net/freeswitch-stable/Makefile +++ b/net/freeswitch-stable/Makefile @@ -414,10 +414,13 @@ $(call Package/$(PKG_NAME)/install/lib,$(1),lib$(PRG_NAME)) $(INSTALL_DIR) $(1)$(FS_STABLE_SCRIPTS_DIR) $(INSTALL_DIR) $(1)$(FS_STABLE_SOUNDS_DIR) $(INSTALL_DIR) $(1)$(FS_STABLE_SYSCONF_DIR)/config + $(INSTALL_DIR) $(1)$(FS_STABLE_SYSCONF_DIR)/hotplug.d/iface $(INSTALL_DIR) $(1)$(FS_STABLE_SYSCONF_DIR)/init.d $(INSTALL_DIR) $(1)$(FS_STABLE_TLS_DIR) $(INSTALL_BIN) ./files/$(PRG_NAME).init \ $(1)$(FS_STABLE_SYSCONF_DIR)/init.d/$(PRG_NAME) + $(INSTALL_BIN) ./files/$(PRG_NAME).hotplug \ + $(1)$(FS_STABLE_SYSCONF_DIR)/hotplug.d/iface/90-$(PRG_NAME) $(INSTALL_CONF) ./files/$(PRG_NAME).config \ $(1)$(FS_STABLE_SYSCONF_DIR)/config/$(PRG_NAME) endef @@ -437,37 +440,17 @@ if [ -z "$${IPKG_INSTROOT}" ]; then echo "| Edit /etc/config/freeswitch to change basic init configuration. |" echo "o-------------------------------------------------------------=^_^=-o" echo -fi -exit 0 -endef - -define Package/$(PKG_NAME)-misc-hotplug -$(call Package/$(PKG_NAME)/Default) - TITLE:=Hotplug script - DEPENDS:=$(PKG_NAME) - PKGARCH:=all -endef - -define Package/$(PKG_NAME)-misc-hotplug/description -This package includes a hotplug script for FreeSWITCH. -endef - -define Package/$(PKG_NAME)-misc-hotplug/install - $(INSTALL_DIR) $(1)$(FS_STABLE_SYSCONF_DIR)/hotplug.d/iface - $(INSTALL_BIN) ./files/$(PRG_NAME).hotplug \ - $(1)$(FS_STABLE_SYSCONF_DIR)/hotplug.d/iface/99-$(PRG_NAME) -endef - -define Package/$(PKG_NAME)-misc-hotplug/postinst -#!/bin/sh -if [ -z "$${IPKG_INSTROOT}" ]; then - echo - echo "o-------------------------------------------------------------------o" - echo "| FreeSWITCH hotplug note |" - echo "o-------------------------------------------------------------------o" - echo "| See /etc/config/freeswitch for hotplug hints. |" - echo "o-------------------------------------------------------------=^_^=-o" - echo + [ -f /etc/hotplug.d/iface/99-freeswitch ] && { + echo "o-------------------------------------------------------------------o" + echo "| WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING |" + echo "o-------------------------------------------------------------------o" + echo "| Please remove freeswitch-stable-misc-hotplug. The hotplug script |" + echo "| is now part of the main freeswitch-stable package. Please run: |" + echo "| |" + echo "| opkg remove freeswitch-stable-misc-hotplug |" + echo "o-------------------------------------------------------------=^_^=-o" + echo + } fi exit 0 endef @@ -939,7 +922,6 @@ endef $(eval $(call BuildPackage,$(PKG_LIBFTDM))) $(eval $(call BuildPackage,$(PKG_NAME))) -$(eval $(call BuildPackage,$(PKG_NAME)-misc-hotplug)) $(eval $(call BuildPackage,$(PKG_NAME)-misc-perl-esl)) $(eval $(call BuildPackage,$(PKG_NAME)-misc-python-esl)) $(eval $(call BuildPackage,$(PKG_NAME)-misc-timezones)) -- 2.30.2