Browse Source

ddns-scripts: write version string during installation into file

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
lilik-openwrt-22.03
Florian Eckert 4 years ago
parent
commit
f5c7271ff1
2 changed files with 8 additions and 1 deletions
  1. +3
    -0
      net/ddns-scripts/Makefile
  2. +5
    -1
      net/ddns-scripts/files/dynamic_dns_functions.sh

+ 3
- 0
net/ddns-scripts/Makefile View File

@ -183,6 +183,9 @@ define Package/ddns-scripts/install
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_CONF) $(PKG_BUILD_DIR)/files/ddns.config $(1)/etc/config/ddns
$(INSTALL_DIR) $(1)/usr/share/ddns
echo "$(PKG_VERSION)-$(PKG_RELEASE)" > $(1)/usr/share/ddns/version
$(INSTALL_DIR) $(1)/usr/share/ddns/services
$(INSTALL_DATA) ./files/usr/share/ddns/services/* \
$(1)/usr/share/ddns/services/


+ 5
- 1
net/ddns-scripts/files/dynamic_dns_functions.sh View File

@ -21,7 +21,11 @@
. /lib/functions/network.sh
# GLOBAL VARIABLES #
VERSION="2.7.8-14"
if [ -f "/usr/share/ddns/version" ]; then
VERSION="$(cat "/usr/share/ddns/version")"
else
VERSION="unknown"
fi
SECTION_ID="" # hold config's section name
VERBOSE=0 # default mode is log to console, but easily changed with parameter
MYPROG=$(basename $0) # my program call name


Loading…
Cancel
Save