Skip to content

Commit 9e1f248

Browse files
committed
Fix prevent adding non exsisting interface
1 parent 0678bde commit 9e1f248

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

bin/v-add-sys-ip

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ source $HESTIA/conf/hestia.conf
4141
#----------------------------------------------------------#
4242

4343
check_args '2' "$#" 'IP NETMASK [INTERFACE] [USER] [STATUS] [NAME] [NATED_IP]'
44-
is_format_valid 'ip' 'netmask' 'interface' 'user' 'ip_status'
44+
is_format_valid 'ip' 'netmask' 'iface' 'user' 'ip_status'
4545
is_ip_free
4646
is_object_valid 'user' 'USER' "$user"
4747
is_object_unsuspended 'user' 'USER' "$user"

func/main.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -963,6 +963,7 @@ is_format_valid() {
963963
hour) is_cron_format_valid "$arg" $arg_name ;;
964964
id) is_int_format_valid "$arg" 'id' ;;
965965
interface) is_interface_format_valid "$arg" ;;
966+
iface) is_interface_format_valid "$arg" ;;
966967
ip) is_ip_format_valid "$arg" ;;
967968
ip_name) is_domain_format_valid "$arg" 'IP name';;
968969
ip_status) is_ip_status_format_valid "$arg" ;;

0 commit comments

Comments
 (0)