mirror of
https://github.com/novatiq/packages.git
synced 2026-04-30 15:38:40 +01:00
openfortivpn: use functions/network.sh to access interface params
Signed-off-by: Aaron Goodman <aaronjg@stanford.edu>
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
. /lib/functions.sh
|
. /lib/functions.sh
|
||||||
|
. /lib/functions/network.sh
|
||||||
. ../netifd-proto.sh
|
. ../netifd-proto.sh
|
||||||
init_proto "$@"
|
init_proto "$@"
|
||||||
|
|
||||||
@@ -36,18 +37,15 @@ proto_openfortivpn_setup() {
|
|||||||
|
|
||||||
|
|
||||||
[ -n "$iface_name" ] && {
|
[ -n "$iface_name" ] && {
|
||||||
json_load "$(ifstatus $iface_name)"
|
network_get_device iface_device_name "$iface_name"
|
||||||
json_get_var iface_device_name l3_device
|
network_is_up "$iface_name" ] || {
|
||||||
json_get_var iface_device_up up
|
|
||||||
}
|
|
||||||
|
|
||||||
[ "$iface_device_up" -eq 1 ] || {
|
|
||||||
msg="$iface_name is not up $iface_device_up"
|
msg="$iface_name is not up $iface_device_up"
|
||||||
logger -t "openfortivpn" "$config: $msg"
|
logger -t "openfortivpn" "$config: $msg"
|
||||||
proto_notify_error "$config" "$msg"
|
proto_notify_error "$config" "$msg"
|
||||||
proto_block_restart "$config"
|
proto_block_restart "$config"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
server_ip=$(resolveip -t 10 "$server")
|
server_ip=$(resolveip -t 10 "$server")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user