View | Details | Raw Unified | Return to bug 8509
Collapse All | Expand All

(-)0.7.15-alt1/etc/net/options.d/00-default (+1 lines)
Lines 25-30 Link Here
25
# config files
25
# config files
26
IFACEDIR=/etc/net/ifaces
26
IFACEDIR=/etc/net/ifaces
27
VARLIBDIR=/var/lib/etcnet
27
VARLIBDIR=/var/lib/etcnet
28
VARLOCKDIR=/var/lock/etcnet
28
VLANTAB=/etc/net/vlantab
29
VLANTAB=/etc/net/vlantab
29
HOSTTAB=/etc/net/hosttab
30
HOSTTAB=/etc/net/hosttab
30
IFTAB=/etc/net/iftab
31
IFTAB=/etc/net/iftab
(-)0.7.15-alt1/etc/net/scripts/create-ppp (-1 / +1 lines)
Lines 26-32 Link Here
26
CHAT_CMD="$CHAT ${CHATOPTIONS:-$DEFAULT_CHATOPTIONS} -f"
26
CHAT_CMD="$CHAT ${CHATOPTIONS:-$DEFAULT_CHATOPTIONS} -f"
27
27
28
# This one is a must.
28
# This one is a must.
29
BASIC_PPPOPTIONS="nolog updetach unit ${NAME//ppp/}"
29
BASIC_PPPOPTIONS="nolog updetach unit ${NAME//ppp/} ipparam etcnet-$NAME"
30
30
31
PROF_PPPOPTIONSFILE=`profiled_filename $MYIFACEDIR/${PPPOPTIONSFILE:=$DEFAULT_PPPOPTIONSFILE}`
31
PROF_PPPOPTIONSFILE=`profiled_filename $MYIFACEDIR/${PPPOPTIONSFILE:=$DEFAULT_PPPOPTIONSFILE}`
32
[ -s $PROF_PPPOPTIONSFILE ] || PROF_PPPOPTIONSFILE=
32
[ -s $PROF_PPPOPTIONSFILE ] || PROF_PPPOPTIONSFILE=
(-)0.7.15-alt1/etc/net/scripts/ifconfig-ipv4 (+33 lines)
Line 0 Link Here
1
#!/bin/bash
2
3
usage()
4
{
5
    echo "Usage: $0 <interface>" >&2
6
    exit 1
7
}
8
9
[ -z "$1" ] && usage
10
NAME=$1
11
12
. ${SCRIPTDIR:=/etc/net/scripts}/functions
13
if [ -d $IFACEDIR/$NAME@$NETHOST ]; then
14
    MYIFACEDIR=$IFACEDIR/$NAME@$NETHOST
15
else
16
    MYIFACEDIR=$IFACEDIR/$NAME
17
fi
18
19
[ -d "$MYIFACEDIR" ] || {
20
    print_error "interface configuration directory '$MYIFACEDIR' not found"
21
    exit 1
22
}
23
export IFACEDIR MYIFACEDIR SCRIPTDIR NAME NETPROFILE SEEN_IFACES
24
25
# Check if interface lock file is present. If true this means that
26
# ifup/ifdown script is working, this script will configure iface
27
# itself, so we exit
28
IFACE_LOCK_FILE="${VARLOCKDIR:=var/lock/etcnet}/if-updown-$NAME.lock"
29
[ -f "$IFACE_LOCK_FILE" ] && exit 0
30
31
${SCRIPTDIR}/config-ipv4 2>/dev/null
32
exit 0
33
(-)0.7.15-alt1/etc/net/scripts/ifdown (+13 lines)
Lines 20-25 Link Here
20
fi
20
fi
21
21
22
export IFACEDIR MYIFACEDIR SCRIPTDIR NAME NETPROFILE SEEN_IFACES
22
export IFACEDIR MYIFACEDIR SCRIPTDIR NAME NETPROFILE SEEN_IFACES
23
24
# ifup/ifdown script creates a lock file while being running for
25
# following popouses:
26
# 1. This prevents running more then one instance of this script
27
#    simultaniously
28
# 2. Presence of lockfile shows other processes that interface is
29
#    under up/down progress
30
31
IFACE_LOCK_FILE="${VARLOCKDIR:=var/lock/etcnet}/if-updown-$NAME.lock"
32
mkdir -p ${VARLOCKDIR}
33
/usr/bin/lockfile "$IFACE_LOCK_FILE" || exit 3
34
trap 'rm -f "$IFACE_LOCK_FILE" ' EXIT SIGHUP SIGTERM SIGINT
35
23
init_netprofile
36
init_netprofile
24
pickup_options
37
pickup_options
25
38
(-)0.7.15-alt1/etc/net/scripts/ifup (+12 lines)
Lines 28-33 Link Here
28
}
28
}
29
export IFACEDIR MYIFACEDIR SCRIPTDIR NAME NETPROFILE SEEN_IFACES
29
export IFACEDIR MYIFACEDIR SCRIPTDIR NAME NETPROFILE SEEN_IFACES
30
30
31
# ifup/ifdown script creates a lock file while being running for
32
# following popouses:
33
# 1. This prevents running more then one instance of this script
34
#    simultaniously
35
# 2. Presence of lockfile shows other processes that interface is
36
#    under up/down progress
37
38
IFACE_LOCK_FILE="${VARLOCKDIR:=var/lock/etcnet}/if-updown-$NAME.lock"
39
mkdir -p ${VARLOCKDIR}
40
/usr/bin/lockfile "$IFACE_LOCK_FILE" || exit 3
41
trap 'rm -f "$IFACE_LOCK_FILE" ' EXIT SIGHUP SIGTERM SIGINT
42
31
init_netprofile
43
init_netprofile
32
pickup_options
44
pickup_options
33
45
(-)0.7.15-alt1/etc/ppp/ip-down.d/etcnet (+35 lines)
Line 0 Link Here
1
#!/bin/bash
2
3
# Check if interface up by etcnet. In this case "$6" must
4
# be set as "etcnet-$NAME" due to pppd ipparam option
5
# when interface was created
6
7
NAME="$1"
8
IPPARAM="$6"
9
10
test "$IPPARAM" = "etcnet-$NAME" || exit
11
12
. ${SCRIPTDIR:=/etc/net/scripts}/functions
13
if [ -d $IFACEDIR/$NAME@$NETHOST ]; then
14
    MYIFACEDIR=$IFACEDIR/$NAME@$NETHOST
15
else
16
    MYIFACEDIR=$IFACEDIR/$NAME
17
fi
18
19
[ -d "$MYIFACEDIR" ] || exit
20
export IFACEDIR MYIFACEDIR SCRIPTDIR NAME NETPROFILE SEEN_IFACES
21
22
# Check if ifdown script is in progress. If true then ifdown
23
# do all itself, so we exit
24
25
IFACE_LOCK_FILE="${VARLOCKDIR:=var/lock/etcnet}/if-updown-$NAME.lock"
26
test -f "$IFACE_LOCK_FLE" && exit
27
28
# At this point we are sure that interface is up by etcnet system
29
# and this script is called by pppd before ifdown was started
30
# (e.g. when reconnected due to persist option)
31
32
# Call custom scripts
33
ExecIfExecutable ${SCRIPTDIR}/ifdown-pre-local $NAME
34
ExecIfExecutable ${MYIFACEDIR}/ifdown-pre $NAME
35
(-)0.7.15-alt1/etc/ppp/ip-up.d/etcnet (+38 lines)
Line 0 Link Here
1
#!/bin/bash
2
3
# Check if interface up by etcnet. In this case "$6" must
4
# be set as "etcnet-$NAME" due to pppd ipparam option
5
# when interface was created
6
7
NAME="$1"
8
IPPARAM="$6"
9
10
test "$IPPARAM" = "etcnet-$NAME" || exit
11
12
. ${SCRIPTDIR:=/etc/net/scripts}/functions
13
if [ -d $IFACEDIR/$NAME@$NETHOST ]; then
14
    MYIFACEDIR=$IFACEDIR/$NAME@$NETHOST
15
else
16
    MYIFACEDIR=$IFACEDIR/$NAME
17
fi
18
19
[ -d "$MYIFACEDIR" ] || exit
20
export IFACEDIR MYIFACEDIR SCRIPTDIR NAME NETPROFILE SEEN_IFACES
21
22
# Check if ifup script is in progress. If true then ifup
23
# do all itself, so we exit
24
25
IFACE_LOCK_FILE="${VARLOCKDIR:=var/lock/etcnet}/if-updown-$NAME.lock"
26
test -f "$IFACE_LOCK_FLE" && exit
27
28
# At this point we are sure that interface is up by etcnet system
29
# and this script is called by pppd after ifup was completed
30
# (e.g. when reconnected due to persist option)
31
32
# Reconfiguring iface and routes
33
ExecIfExecutable ${SCRIPTDIR}/ifconfig-ipv4 $NAME
34
35
# Call custom scripts
36
ExecIfExecutable ${SCRIPTDIR}/ifup-post-local $NAME
37
ExecIfExecutable ${MYIFACEDIR}/ifup-post $NAME
38

Return to bug 8509