]> git.pld-linux.org Git - projects/rc-scripts.git/blame - sysconfig/network-scripts/ifup-post
- Moves cursor to a new line also after "WORK" and "FAIL".
[projects/rc-scripts.git] / sysconfig / network-scripts / ifup-post
CommitLineData
12de71be 1#!/bin/sh
b0443108 2#
919bed72 3# $Id: ifup-post,v 1.20 2000/04/21 17:45:24 jajcus Exp $
b0443108 4#
7742e157 5
201c98b9
AM
6run_up() { :; }
7
f3002e12 8. /etc/sysconfig/network
8b3e2b71 9. /etc/sysconfig/network-scripts/.functions
7742e157
AF
10
11need_hostname
12de71be 12CONFIG=$1
7742e157
AF
13source_config
14
97c76ad5 15# full device name as specified by user
38198f50 16FULLDEVNAME="$DEVICE"
97c76ad5 17# type of device for example "dummy" or "eth"
38198f50 18DEVICETYPE=`echo $FULLDEVNAME | sed "s/[0-9]*$//"`
97c76ad5 19# name of real device ie. eth0 when eth0,eth0:1,eth0:alias
38198f50
AM
20DEVICE=`echo $FULLDEVNAME | sed 's/:.*//g'`
21
919bed72
JK
22get_ppp_device_and_pid
23
38198f50 24if echo "$FULLDEVNAME" | grep -q ':' ; then
e4cc7085 25 ISALIAS=yes
7742e157 26else
e4cc7085 27 ISALIAS=no
7742e157
AF
28fi
29
919bed72
JK
30# Set the queuing discipline
31# eg: sfq for better link sharing or teql0 for link equalizer
32if [ -n "$QDISC" ] ; then
33 tc qdisc add dev "$REALDEVICE" root $QDISC
34fi
35
979e6977 36/etc/sysconfig/network-scripts/ifup-routes ${CONFIG}
7742e157 37
830949ca 38if [ "$ISALIAS" = "no" ] ; then
e4cc7085 39 /etc/sysconfig/network-scripts/ifup-aliases ${DEVICE}
7742e157
AF
40fi
41
d29c401a
AM
42# don't set hostname on ppp/slip connections
43if [ -n "$NEEDHOSTNAME" -a "${DEVICE}" != lo -a "${DEVICETYPE}" != "ppp" -a "${DEVICETYPE}" != "slip" ]; then
1381691b 44 IPADDR=`ip -f inet addr show dev ${DEVICE} label ${FULLDEVNAME} |
6588d0a8 45 awk '/inet/ { print $2 }' |awk -F"/" '{ print $1 }'`
e4cc7085 46 eval `/bin/ipcalc --silent --hostname ${IPADDR}` && set_hostname $HOSTNAME
7742e157
AF
47fi
48
201c98b9
AM
49# execute run_up() function (if available in device configuration file)
50[ "$ISALIAS" = "no" ] && run_up
97c76ad5 51
7742e157
AF
52# Notify programs that have requested notification
53do_netreport
54
55exit 0
This page took 0.066423 seconds and 4 git commands to generate.