]>
Commit | Line | Data |
---|---|---|
12de71be | 1 | #!/bin/sh |
b0443108 | 2 | # |
de1fc6ce | 3 | # $Id: ifup-post,v 1.23 2001/05/15 16:03:44 baggins Exp $ |
b0443108 | 4 | # |
7742e157 | 5 | |
201c98b9 AM |
6 | run_up() { :; } |
7 | ||
dd4a755f | 8 | . /etc/rc.d/init.d/functions |
f3002e12 | 9 | . /etc/sysconfig/network |
8b3e2b71 | 10 | . /etc/sysconfig/network-scripts/.functions |
7742e157 AF |
11 | |
12 | need_hostname | |
12de71be | 13 | CONFIG=$1 |
7742e157 AF |
14 | source_config |
15 | ||
de1fc6ce JR |
16 | # set all major variables |
17 | setup_ip_param | |
38198f50 | 18 | |
de1fc6ce | 19 | # set REALDEVICE |
919bed72 JK |
20 | get_ppp_device_and_pid |
21 | ||
de1fc6ce | 22 | if [ -n "$QDISC" ]; then |
919bed72 JK |
23 | # Set the queuing discipline |
24 | # eg: sfq for better link sharing or teql0 for link equalizer | |
919bed72 JK |
25 | tc qdisc add dev "$REALDEVICE" root $QDISC |
26 | fi | |
27 | ||
de1fc6ce JR |
28 | /etc/sysconfig/network-scripts/ifup-aliases ${DEVICE} |
29 | /etc/sysconfig/network-scripts/ifup-routes ${DEVICE} | |
7742e157 | 30 | |
de1fc6ce JR |
31 | # don't set hostname on ppp/slip connections |
32 | if [ -n "$NEEDHOSTNAME" -a "${DEVICETYPE}" != "ppp" -a "${DEVICETYPE}" != "slip" ]; then | |
33 | IPADDR=$(ip -f inet addr show dev ${DEVICE} | | |
34 | awk '/inet/ { print $2 }' |awk -F"/" '{ print $1 }') | |
35 | eval $(/bin/ipcalc --silent --hostname ${IPADDR}) && set_hostname $HOSTNAME | |
7742e157 AF |
36 | fi |
37 | ||
de1fc6ce JR |
38 | # run tleds software |
39 | if [ "$TLEDS_DEV" = "$DEVICE" -a -x /usr/bin/tleds ]; then | |
40 | /usr/bin/tleds -qc "$DEVICE" | |
7742e157 AF |
41 | fi |
42 | ||
201c98b9 | 43 | # execute run_up() function (if available in device configuration file) |
de1fc6ce | 44 | run_up |
97c76ad5 | 45 | |
7742e157 AF |
46 | # Notify programs that have requested notification |
47 | do_netreport | |
48 | ||
49 | exit 0 | |
de1fc6ce JR |
50 | |
51 | # This must be last line ! | |
52 | # vi:syntax=sh:tw=78:ts=8:sw=4 |