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 <sebastian_ml@gmx.net>
This commit is contained in:
Sebastian Kemper 2018-11-12 21:55:21 +01:00
parent 5a35a231ec
commit e730272a77

View file

@ -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_SCRIPTS_DIR)
$(INSTALL_DIR) $(1)$(FS_STABLE_SOUNDS_DIR) $(INSTALL_DIR) $(1)$(FS_STABLE_SOUNDS_DIR)
$(INSTALL_DIR) $(1)$(FS_STABLE_SYSCONF_DIR)/config $(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_SYSCONF_DIR)/init.d
$(INSTALL_DIR) $(1)$(FS_STABLE_TLS_DIR) $(INSTALL_DIR) $(1)$(FS_STABLE_TLS_DIR)
$(INSTALL_BIN) ./files/$(PRG_NAME).init \ $(INSTALL_BIN) ./files/$(PRG_NAME).init \
$(1)$(FS_STABLE_SYSCONF_DIR)/init.d/$(PRG_NAME) $(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 \ $(INSTALL_CONF) ./files/$(PRG_NAME).config \
$(1)$(FS_STABLE_SYSCONF_DIR)/config/$(PRG_NAME) $(1)$(FS_STABLE_SYSCONF_DIR)/config/$(PRG_NAME)
endef endef
@ -437,37 +440,17 @@ if [ -z "$${IPKG_INSTROOT}" ]; then
echo "| Edit /etc/config/freeswitch to change basic init configuration. |" echo "| Edit /etc/config/freeswitch to change basic init configuration. |"
echo "o-------------------------------------------------------------=^_^=-o" echo "o-------------------------------------------------------------=^_^=-o"
echo echo
fi [ -f /etc/hotplug.d/iface/99-freeswitch ] && {
exit 0 echo "o-------------------------------------------------------------------o"
endef echo "| WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING |"
echo "o-------------------------------------------------------------------o"
define Package/$(PKG_NAME)-misc-hotplug echo "| Please remove freeswitch-stable-misc-hotplug. The hotplug script |"
$(call Package/$(PKG_NAME)/Default) echo "| is now part of the main freeswitch-stable package. Please run: |"
TITLE:=Hotplug script echo "| |"
DEPENDS:=$(PKG_NAME) echo "| opkg remove freeswitch-stable-misc-hotplug |"
PKGARCH:=all echo "o-------------------------------------------------------------=^_^=-o"
endef echo
}
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
fi fi
exit 0 exit 0
endef endef
@ -939,7 +922,6 @@ endef
$(eval $(call BuildPackage,$(PKG_LIBFTDM))) $(eval $(call BuildPackage,$(PKG_LIBFTDM)))
$(eval $(call BuildPackage,$(PKG_NAME))) $(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-perl-esl))
$(eval $(call BuildPackage,$(PKG_NAME)-misc-python-esl)) $(eval $(call BuildPackage,$(PKG_NAME)-misc-python-esl))
$(eval $(call BuildPackage,$(PKG_NAME)-misc-timezones)) $(eval $(call BuildPackage,$(PKG_NAME)-misc-timezones))