4 Commits

Author SHA1 Message Date
6d2fd44dba - Start migration of dns, network & vpn lib,
- Start migration of rx3_net_adm.
2026-04-13 16:35:39 +02:00
0c05cfd6c0 - Fix ReleaseNotes file. 2026-04-13 12:08:50 +02:00
540bd1ce03 - Add rx3-network.minotaur config file,
- Add missing etc/sudoers.d/rx3-network config file.
2025-10-19 20:13:09 +02:00
5e3d8ed47b - Minor config files update. 2025-09-19 11:43:49 +02:00
15 changed files with 138 additions and 25 deletions

View File

@@ -1,3 +1,14 @@
------------------------------------------------------------------------------------------------------------------------------------
Network Tools V 1.2.0 - A. GIBERT - 2026/04/xx
------------------------------------------------------------------------------------------------------------------------------------
- Migrate Network Tools to the new Rx3 Base Bash library,
- Add RPM Spec & bash completion files,
- Move install dir form /usr/locla to usr,
- Support now rx3-base 1.1.1.
------------------------------------------------------------------------------------------------------------------------------------
Network Tools V 1.1.3 - A. GIBERT - 2025/09/19
------------------------------------------------------------------------------------------------------------------------------------

View File

@@ -1,28 +1,48 @@
#!/bin/bash
#-----------------------------------------------------------------------------------------------------------------------------------
#
# Rx3 DNS Library
#
# Copyright (C) 2025-2026 Arnaud G. GIBERT
# mailto:arnaud@rx3.net
#
# This is free software: you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this program; If not, see
# <https://www.gnu.org/licenses/>.
#
#-----------------------------------------------------------------------------------------------------------------------------------
if [[ "${DNS_BASH}" != "" ]]
if [[ "${RX3_DNS_LIB}" != "" ]]
then
return
else
declare -g DNS_BASH=1
declare -g RX3_DNS_LIB=1
fi
#-----------------------------------------------------------------------------------------------------------------------------------
# Includes
#-----------------------------------------------------------------------------------------------------------------------------------
if [[ -e /usr/local/lib/default.bash ]]
then
. /usr/local/lib/default.bash
else
. /usr/global/lib/default.bash
fi
: "${RX3_LIB_DIR:=/usr/lib/rx3}"
. "${RX3_LIB_DIR}/base.bash"
#-----------------------------------------------------------------------------------------------------------------------------------
# Global Variable
#-----------------------------------------------------------------------------------------------------------------------------------

View File

@@ -1,23 +1,48 @@
#!/bin/bash
#-----------------------------------------------------------------------------------------------------------------------------------
#
# Rx3 Network Library
#
# Copyright (C) 2025-2026 Arnaud G. GIBERT
# mailto:arnaud@rx3.net
#
# This is free software: you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this program; If not, see
# <https://www.gnu.org/licenses/>.
#
#-----------------------------------------------------------------------------------------------------------------------------------
if [[ "${NETWORK_BASH}" != "" ]]
if [[ "${RX3_NETWORK_LIB}" != "" ]]
then
return
else
declare -g NETWORK_BASH=1
declare -g RX3_NETWORK_LIB=1
fi
#-----------------------------------------------------------------------------------------------------------------------------------
# Includes
#-----------------------------------------------------------------------------------------------------------------------------------
. /usr/local/lib/dns.bash
: "${RX3_LIB_DIR:=/usr/lib/rx3}"
. "${RX3_LIB_DIR}/dns.bash"
#-----------------------------------------------------------------------------------------------------------------------------------
# Global Variable
#-----------------------------------------------------------------------------------------------------------------------------------
@@ -119,7 +144,7 @@ num_to_ip()
# Optional safety check
if (( num < 0 || num > 4294967295 ))
then
echo "num_to_ip: value out of range (04294967295)" >&2
echo_error "num_to_ip: value out of range (04294967295)"
return 1
fi
@@ -699,7 +724,7 @@ network_src_tab_load()
if [[ " ${NETWORK_TABLE_LIST} " != *" ${nstl_table} "* ]]
then
err_echo "Invalid table number: [${nstl_table}] in network src entry: [${nstl_id}]!"
echo_error "Invalid table number: [${nstl_table}] in network src entry: [${nstl_id}]!"
exit 1
fi
@@ -1094,13 +1119,13 @@ network_table_set()
if [[ "${src_id}" == "" ]]
then
err_echo "IP not found: [${nts_ip}]!"
echo_error "IP not found: [${nts_ip}]!"
return 1
fi
if [[ " ${NETWORK_TABLE_LIST} " != *" ${nts_table} "* ]]
then
err_echo "Table not found: [${nts_table}]!"
echo_error "Table not found: [${nts_table}]!"
return 1
fi

View File

@@ -1,23 +1,48 @@
#!/bin/bash
#-----------------------------------------------------------------------------------------------------------------------------------
#
# Rx3 VPN Library
#
# Copyright (C) 2025-2026 Arnaud G. GIBERT
# mailto:arnaud@rx3.net
#
# This is free software: you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this program; If not, see
# <https://www.gnu.org/licenses/>.
#
#-----------------------------------------------------------------------------------------------------------------------------------
if [[ "${VPN_BASH}" != "" ]]
if [[ "${RX3_VPN_LIB}" != "" ]]
then
return
else
declare -g VPN_BASH=1
declare -g RX3_VPN_LIB=1
fi
#-----------------------------------------------------------------------------------------------------------------------------------
# Includes
#-----------------------------------------------------------------------------------------------------------------------------------
. /usr/local/lib/network.bash
: "${RX3_LIB_DIR:=/usr/lib/rx3}"
. "${RX3_LIB_DIR}/network.bash"
#-----------------------------------------------------------------------------------------------------------------------------------
# Global Variable
#-----------------------------------------------------------------------------------------------------------------------------------

View File

@@ -1,4 +1,43 @@
#!/bin/bash
#-----------------------------------------------------------------------------------------------------------------------------------
#
# Rx3 Net Adm
#
# Copyright (C) 2025-2026 Arnaud G. GIBERT
# mailto:arnaud@rx3.net
#
# This is free software: you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this program; If not, see
# <https://www.gnu.org/licenses/>.
#
#-----------------------------------------------------------------------------------------------------------------------------------
#-----------------------------------------------------------------------------------------------------------------------------------
# Includes
#-----------------------------------------------------------------------------------------------------------------------------------
: "${RX3_LIB_DIR:=/usr/lib/rx3}"
. "${RX3_LIB_DIR}/network.bash"
#-----------------------------------------------------------------------------------------------------------------------------------
# Global Variable
#-----------------------------------------------------------------------------------------------------------------------------------
RETVAL=0
prog="rx3-net"
@@ -12,13 +51,6 @@ prog="rx3-net"
# Includes
#-----------------------------------------------------------------------------------------------------------------------------------
. /usr/local/lib/network.bash
#--------------------------------------------------------------------------------------------------------------------------