#!/bin/sh
#
#	$Id: ifup-aliases,v 1.9 1999/10/13 21:28:40 kloczek Exp $
#
# adds aliases of device $1

. /etc/sysconfig/network
. /etc/sysconfig/network-scripts/.functions

if [ "$1" = "" ]; then
	echo "usage: $0 <net-device>"
	exit 1
fi

# bash 2 is so much fun.
if [ "$BASH_VERSINFO" ]; then
        shopt -s nullglob
else
        allow_null_glob_expansion=foo
fi

cd /etc/sysconfig/interfaces/

for alias in ifcfg-$1:* ; do
        [ -f $alias ] && /sbin/ifup $alias
done

for alias in `find_ldap_aliases` ; do
        /sbin/ifup $alias
done

if [ "$BASH_VERSINFO" ]; then
        shopt -u nullglob
else
        unset allow_null_glob_expansion
fi

