From 1338affe83fbec9eae1b67ff4480f25efc4a425a Mon Sep 17 00:00:00 2001 From: "Arnaud G. GIBERT" Date: Sun, 13 Sep 2026 17:16:42 +0200 Subject: [PATCH] - Add VSL support, - Support now rx3-base 1.2.0. --- ReleaseNotes.txt | 9 +++++++++ SPECS/myip.spec | 5 ++++- bin/myip | 35 ++++++++++++++++++++++++----------- 3 files changed, 37 insertions(+), 12 deletions(-) diff --git a/ReleaseNotes.txt b/ReleaseNotes.txt index df38215..ca608f1 100644 --- a/ReleaseNotes.txt +++ b/ReleaseNotes.txt @@ -1,3 +1,12 @@ +------------------------------------------------------------------------------------------------------------------------------------ +MyIP V 1.2.2 - A. GIBERT - 2026/09/13 +------------------------------------------------------------------------------------------------------------------------------------ + +- Add VSL support, +- Support now rx3-base 1.2.0. + + + ------------------------------------------------------------------------------------------------------------------------------------ MyIP V 1.2.1 - A. GIBERT - 2026/05/03 ------------------------------------------------------------------------------------------------------------------------------------ diff --git a/SPECS/myip.spec b/SPECS/myip.spec index 8b9cf71..2c71f66 100644 --- a/SPECS/myip.spec +++ b/SPECS/myip.spec @@ -24,7 +24,7 @@ %define name myip -%define version 1.2.1 +%define version 1.2.2 %define release %mkrel 1rx3 %global debug_package %{nil} @@ -130,6 +130,9 @@ install -D -pm 755 www/cgi-bin/%{name}.cgi %{buildroot}%{_webcgi}/%{name} #----------------------------------------------------------------------------------------------------------------------------------- %changelog +* Sun Sep 13 2026 Arnaud G. GIBERT - 1.2.2-1rx3.mga9 +- Update to 1.2.2 + * Sun May 3 2026 Arnaud G. GIBERT - 1.2.1-1rx3.mga9 - Update to 1.2.1 - Add bash completion script diff --git a/bin/myip b/bin/myip index 3231e0c..f661edc 100755 --- a/bin/myip +++ b/bin/myip @@ -39,14 +39,14 @@ # Global Variables #----------------------------------------------------------------------------------------------------------------------------------- -declare -g VERSION="1.2.1" +declare -g VERSION="1.2.2" declare -g NAME="MyIP" declare -g HELP="usage: [-h | --help] | [-V | --version] | [-i | --internal] | [-a | --all] [-T | --test] [-v | --verbose] " +declare -g EXIT_CODE=0 declare -g MODE="EXTERNAL" declare -g VERBOSE="FALSE" declare -g DRY_RUN="FALSE" -declare -g RETVAL=0 declare -g WEB_SERVER_NAME="www.rx3" declare -g WEB_SERVER_IP="10.0.0.65" @@ -78,7 +78,6 @@ myip_version_print() myip_help_print() { - myip_version_print help_print echo " default: external IP" echo " -i: internal IP" @@ -106,9 +105,9 @@ myip_args_parse() case "$1" in # Mode switches -a|--all) MODE="ALL"; shift;; - -h|--help) MODE="EXIT"; myip_help_print; shift;; + -h|--help) MODE="HELP"; shift;; -i|--internal) MODE="INTERNAL"; shift;; - -V|--version) MODE="EXIT"; myip_version_print; shift;; + -V|--version) MODE="VERSION"; shift;; # Global options -T|--test) DRY_RUN="TRUE"; shift;; @@ -210,14 +209,27 @@ myip_external_get() # Main #----------------------------------------------------------------------------------------------------------------------------------- +vsl_add + myip_args_parse "$@" +case "${MODE}" in + "EXIT") + exit ${EXIT_CODE} + ;; + + "HELP") + myip_help_print + exit ${EXIT_CODE} + ;; + + "VERSION") + myip_version_print + exit ${EXIT_CODE} + ;; +esac -if [[ "${MODE}" == "EXIT" ]] -then - exit 0 -fi dns_init @@ -237,10 +249,11 @@ case "${MODE}" in *) myip_help_print - RETVAL=1 + EXIT_CODE=1 ;; esac dns_deinit -exit ${RETVAL} + +exit ${EXIT_CODE}