1
0
This repository has been archived on 2025-01-10. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
Anderson Luiz Alves 0464e230c1 stock 103961
2017-07-30 16:48:04 -03:00

39 lines
813 B
Bash
Executable File

#!/bin/sh
#
# This script is run by pppd when ppp link fails to established.
# Environnement variables:
# IFNAME: $1, interface name (pppi)
# DEVICE: $2, device name (atmi)
# retain only characters after / (/dev/ttyUSB0)
IFNAME=${1:-}
DEVICE=${2:-}
DEVICE=${DEVICE##*/}
# for ppp over vpn DEVICE is empty
[ "$DEVICE" = '' ] && DEVICE=$IFNAME
. /etc/bewan/scripts/globals
. /etc/bewan/lib/base
base_log "$SCRIPTD/ppp-fail6 $DEVICE" debug
# Take wan-up-down mutex
base_enter_critical 'wan-up-down'
# Get config parameters after taking lock
base_call_initd 'setparam'
if [ -f "$INTFD/$DEVICE/wanid" ]; then
WANID=`cat $INTFD/$DEVICE/wanid`
# ip-fail6 wants this variable to be set
local IFFLAGS=
base_call_scripts 'ip-fail6'
fi
# Release wan-up-down mutex
base_exit_critical 'wan-up-down'