Compare commits

...

1 Commits

Author SHA1 Message Date
Omar Kallel
db594e2829 Remove the use of .icwmpd_boot file 2021-11-16 07:29:24 +01:00
2 changed files with 35 additions and 42 deletions

View File

@@ -8,11 +8,11 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=icwmp
PKG_VERSION:=8.2.8-2021-11-13
PKG_VERSION:=8.2.9-2021-11-15
PKG_FIXUP:=autoreconf
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/icwmp.git
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=1b5b3b3f8d92c5a18f20dba512755acfc9bcc953
PKG_SOURCE_VERSION:=64310c6cf55128f555c354c1743c6814576db3a6
PKG_RELEASE=$(PKG_SOURCE_VERSION)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip

View File

@@ -200,47 +200,40 @@ validate_acs_url() {
}
start_service() {
if [ ! -f /tmp/.icwmpd_boot ]; then
touch /etc/icwmpd/.icwmpd_boot
touch /tmp/.icwmpd_boot
else
[ -f /sbin/netifd ] && log "Waiting for Network to be started ..." && ubus -t 5 wait_for network.interface
[ -f /etc/config/wireless ] && log "Waiting for WiFi to be started ..." && ubus -t 5 wait_for network.wireless
[ -f /usr/sbin/dnsmasq ] && log "Waiting for DNS Proxy to be started ..." && ubus -t 5 wait_for dnsmasq
[ -f /etc/config/dhcp ] && log "Waiting for DNS Server(s) ..." && wait_for_resolvfile 20
[ -f /usr/sbin/asterisk ] && log "Waiting for Voice to be started ..." && ubus -t 5 wait_for asterisk
log "Waiting for usp.raw to be started"
ubus wait_for usp.raw
validate_defaults || {
log "Validation of defaults failed"
return 1;
}
# Set wan interface if not configured
set_wan_interface
# Set dhcp option 43 if dhcp discovery enabled
if [ "${dhcp_discovery}" == "enable" -o "${dhcp_discovery}" == "1" ]; then
enable_dhcp_option43 $default_wan_interface
wait_for_option43 20
fi
validate_acs_url || {
log "Validation of ACS URL failed"
return 1;
}
copy_cwmp_etc_files_to_varstate
procd_open_instance icwmp
procd_set_param command "$PROG"
procd_set_param respawn \
${respawn_threshold:-5} \
${respawn_timeout:-10} ${respawn_retry:-3}
procd_close_instance
[ -f /sbin/netifd ] && log "Waiting for Network to be started ..." && ubus -t 5 wait_for network.interface
[ -f /usr/sbin/dnsmasq ] && log "Waiting for DNS Proxy to be started ..." && ubus -t 5 wait_for dnsmasq
[ -f /etc/config/dhcp ] && log "Waiting for DNS Server(s) ..." && wait_for_resolvfile 20
log "Waiting for usp.raw to be started"
ubus wait_for usp.raw
validate_defaults || {
log "Validation of defaults failed"
return 1;
}
# Set wan interface if not configured
set_wan_interface
# Set dhcp option 43 if dhcp discovery enabled
if [ "${dhcp_discovery}" == "enable" -o "${dhcp_discovery}" == "1" ]; then
enable_dhcp_option43 $default_wan_interface
wait_for_option43 20
fi
validate_acs_url || {
log "Validation of ACS URL failed"
return 1;
}
copy_cwmp_etc_files_to_varstate
procd_open_instance icwmp
procd_set_param command "$PROG"
procd_set_param respawn \
${respawn_threshold:-5} \
${respawn_timeout:-10} ${respawn_retry:-3}
procd_close_instance
}
stop_service()