]> git.pld-linux.org Git - projects/rc-scripts.git/blame - sysconfig/network-scripts/ifup-post
- changed RUN_LDCONFIG to no.
[projects/rc-scripts.git] / sysconfig / network-scripts / ifup-post
CommitLineData
12de71be 1#!/bin/sh
b0443108 2#
97c76ad5 3# $Id: ifup-post,v 1.16 2000/03/08 16:30:14 misiek Exp $
b0443108 4#
7742e157 5
f3002e12 6. /etc/sysconfig/network
8b3e2b71 7. /etc/sysconfig/network-scripts/.functions
7742e157
AF
8
9need_hostname
12de71be 10CONFIG=$1
7742e157
AF
11source_config
12
97c76ad5 13# full device name as specified by user
38198f50 14FULLDEVNAME="$DEVICE"
97c76ad5 15# type of device for example "dummy" or "eth"
38198f50 16DEVICETYPE=`echo $FULLDEVNAME | sed "s/[0-9]*$//"`
97c76ad5 17# name of real device ie. eth0 when eth0,eth0:1,eth0:alias
38198f50
AM
18DEVICE=`echo $FULLDEVNAME | sed 's/:.*//g'`
19
20if echo "$FULLDEVNAME" | grep -q ':' ; then
e4cc7085 21 ISALIAS=yes
7742e157 22else
e4cc7085 23 ISALIAS=no
7742e157
AF
24fi
25
ea04cbe6 26/etc/sysconfig/network-scripts/ifup-routes ${FULLDEVNAME}
7742e157 27
830949ca 28if [ "$ISALIAS" = "no" ] ; then
e4cc7085 29 /etc/sysconfig/network-scripts/ifup-aliases ${DEVICE}
7742e157
AF
30fi
31
d29c401a
AM
32# don't set hostname on ppp/slip connections
33if [ -n "$NEEDHOSTNAME" -a "${DEVICE}" != lo -a "${DEVICETYPE}" != "ppp" -a "${DEVICETYPE}" != "slip" ]; then
1381691b 34 IPADDR=`ip -f inet addr show dev ${DEVICE} label ${FULLDEVNAME} |
e4cc7085 35 awk '{ print $2 }' |awk -F"/" '{ print $1 }'`
36 eval `/bin/ipcalc --silent --hostname ${IPADDR}` && set_hostname $HOSTNAME
7742e157
AF
37fi
38
97c76ad5
AM
39# run scripts in /etc/sysconfig/interfaces/scripts/$DEVICE/
40# named somename.up
41rparts "/etc/sysconfig/interfaces/scripts/$DEVICE" start
42
7742e157
AF
43# Notify programs that have requested notification
44do_netreport
45
46exit 0
This page took 0.044612 seconds and 4 git commands to generate.