Skip to contentSkip to conversation

inadyn: do not install default conf file

PATCH New Ryan Coe 2 participants 4 messages Oct 17, 2016

lore
Share & tools
lore

Ryan Coe

author
#0 lore raw

PATCH v2 1/3 inadyn: do not install default conf file

The default conf file is not usable without modification. It is also not compatible with the newer 2.0 series. Therefore, we will simply remove the file. We also modify the startup script to silently exit if the conf file is not found.

---
 package/inadyn/S70inadyn      |  4 ++--
 package/inadyn/inadyn.conf    | 11 -----------
 package/inadyn/inadyn.mk      |  6 ------
 package/inadyn/inadyn.service |  2 +-
 4 files changed, 3 insertions(+), 20 deletions(-)
 delete mode 100644 package/inadyn/inadyn.conf
package/inadyn/S70inadyn +2 -2
index ca7b414..a66c3bd 100644
@@ -5,8 +5,8 @@
 
 CONFIG=/etc/inadyn.conf
 
-# check if CONFIG exists, print message & exit if it doesn't
-[ ! -f $CONFIG ] && ( echo "The config file "$CONFIG" is missing...exiting now." && exit 2 )
+# check if CONFIG exists, exit silently if it does not
+[ ! -f $CONFIG ] && exit 1
 
 # Allow a few customizations from a config file. Especially inadyn
 # must be explicitly enabled by adding ENABLED="yes" in this file.
package/inadyn/inadyn.conf deleted +0 -11
deleted file mode 100644
index ab8aa36..0000000
@@ -1,11 +0,0 @@
-# Basic configuration file for inadyn
-#
-# /etc/inadyn.conf
-pidfile /var/run/inadyn.pid
-update_period_sec 600 # Check for a new IP every 600 seconds
-username test		# replace 'test' with your username
-password test		# replace 'test' with your password
-dyndns_system default at dyndns.org   # replace w/ your provider
-
-alias test.homeip.net
-# replace 'test.homeip.net' with yourdomainname for actual (non-test) use
package/inadyn/inadyn.mk +0 -6
index 8ceca4c..cf071da 100644
@@ -19,12 +19,6 @@ else
 INADYN_CONF_OPTS += --disable-ssl
 endif
 
-define INADYN_INSTALL_SAMPLE_CONFIG
-	$(INSTALL) -D -m 0600 package/inadyn/inadyn.conf \
-		$(TARGET_DIR)/etc/inadyn.conf
-endef
-INADYN_POST_INSTALL_TARGET_HOOKS += INADYN_INSTALL_SAMPLE_CONFIG
-
 define INADYN_INSTALL_INIT_SYSV
 	$(INSTALL) -D -m 0755 package/inadyn/S70inadyn \
 		$(TARGET_DIR)/etc/init.d/S70inadyn
package/inadyn/inadyn.service +1 -1
index abc0a1e..199ad62 100644
@@ -3,7 +3,7 @@ Description=DDNS client
 After=syslog.target network.target
 
 [Service]
-ExecStart=/usr/bin/inadyn
+ExecStart=test -f /etc/inadyn.conf && /usr/bin/inadyn
 Restart=always
 
 [Install]
Signature · 1 line
2.9.3
author
#1 lore raw

PATCH v2 2/3 inadyn: bump to version 2.0

---
 package/inadyn/Config.in   |  2 ++
 package/inadyn/inadyn.hash |  4 ++--
 package/inadyn/inadyn.mk   | 13 ++++++++++---
 3 files changed, 14 insertions(+), 5 deletions(-)
package/inadyn/Config.in +2 -0
index 65f6851..d03db83 100644
@@ -2,6 +2,8 @@ config BR2_PACKAGE_INADYN
 	bool "inadyn"
 	depends on BR2_USE_MMU # Uses fork()
 	depends on !BR2_STATIC_LIBS # dlopen()
+	select BR2_PACKAGE_LIBCONFUSE
+	select BR2_PACKAGE_LIBITE
 	help
 	  INADYN is a free DynDNS client. It gives the possibility
 	  to have your own fixed hostname registered on the internet,
package/inadyn/inadyn.hash +2 -2
index 940bd16..a4e60c9 100644
@@ -1,2 +1,2 @@
-# From https://github.com/troglobit/inadyn/releases/download/1.99.12/inadyn-1.99.12.tar.xz.md5
-md5	a620c9eab9cd31c8923e7264b08376f3	inadyn-1.99.12.tar.xz
+# Locally computed
+sha256	763c53eb3856decfe8b921cab8a54b428b079a62264fbcf6c89690713d63529a  inadyn-v2.0.tar.gz
package/inadyn/inadyn.mk +10 -3
index cf071da..b8399b4 100644
@@ -4,11 +4,18 @@
 #
 ################################################################################
 
-INADYN_VERSION = 1.99.12
-INADYN_SITE = https://github.com/troglobit/inadyn/releases/download/$(INADYN_VERSION)
-INADYN_SOURCE = inadyn-$(INADYN_VERSION).tar.xz
+INADYN_VERSION = v2.0
+INADYN_SITE = $(call github,troglobit,inadyn,$(INADYN_VERSION))
 INADYN_LICENSE = GPLv2+
 INADYN_LICENSE_FILES = COPYING
+INADYN_AUTORECONF = YES
+INADYN_DEPENDENCIES = host-pkgconf libconfuse libite
+
+# Needed for autoreconf to work properly, see ./autogen.sh
+define INADYN_FIXUP_M4_DIR
+	mkdir $(@D)/m4
+endef
+INADYN_POST_EXTRACT_HOOKS += INADYN_FIXUP_M4_DIR
 
 ifeq ($(BR2_PACKAGE_OPENSSL),y)
 INADYN_CONF_OPTS += --enable-openssl
Signature · 1 line
2.9.3
#3 lore raw

PATCH v2 1/3 inadyn: do not install default conf file

In reply to Ryan Coe

Hello,

Quoted 1 line · Ryan Coe

The default conf file is not usable without modification.

Right, but it provide a good starting point.

Quoted 1 line

It is also not compatible with the newer 2.0 series.

This is not really an excuse, it should simply be updated together with the bump to 2.0.

Thanks,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com