diff options
| author | Florian Eckert <fe@dev.tdt.de> | 2020-09-16 15:54:35 +0200 |
|---|---|---|
| committer | Florian Eckert <fe@dev.tdt.de> | 2020-09-21 10:17:01 +0200 |
| commit | f5c7271ff12e08b4f1cf20ad7acfbe6f06ce1627 (patch) | |
| tree | 50a5d1c57f24064a66af4d6c1e398aae57cfd5fd /net/ddns-scripts | |
| parent | 4f6614c41dd58c8c64d227637d271c5cac42cf5b (diff) | |
ddns-scripts: write version string during installation into file
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
Diffstat (limited to 'net/ddns-scripts')
| -rwxr-xr-x | net/ddns-scripts/Makefile | 3 | ||||
| -rwxr-xr-x | net/ddns-scripts/files/dynamic_dns_functions.sh | 6 |
2 files changed, 8 insertions, 1 deletions
diff --git a/net/ddns-scripts/Makefile b/net/ddns-scripts/Makefile index d432364e1..1f22997f5 100755 --- a/net/ddns-scripts/Makefile +++ b/net/ddns-scripts/Makefile @@ -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/ diff --git a/net/ddns-scripts/files/dynamic_dns_functions.sh b/net/ddns-scripts/files/dynamic_dns_functions.sh index b5dc144ca..4a994ebc7 100755 --- a/net/ddns-scripts/files/dynamic_dns_functions.sh +++ b/net/ddns-scripts/files/dynamic_dns_functions.sh @@ -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 |
