/[baselayout]/trunk/net.BSD/ifconfig.sh
Gentoo

Diff of /trunk/net.BSD/ifconfig.sh

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 2812 Revision 2813
76 shift 76 shift
77 echo "/$(_netmask2cidr "$1")" 77 echo "/$(_netmask2cidr "$1")"
78} 78}
79 79
80_add_address() { 80_add_address() {
81 local inet6=
82
83 case "$@" in
84 *:*) inet6=inet6 ;;
85 esac
86
81 if [ "${metric:-0}" != "0" ] ; then 87 if [ "${metric:-0}" != "0" ] ; then
82 set -- "$@" metric ${metric} 88 set -- "$@" metric ${metric}
83 fi 89 fi
84 90
85 # ifconfig doesn't like CIDR addresses 91 # ifconfig doesn't like CIDR addresses
92 set -- "${ip}" netmask "${netmask}" "$@" 98 set -- "${ip}" netmask "${netmask}" "$@"
93 fi 99 fi
94 ;; 100 ;;
95 esac 101 esac
96 102
97 case "$@" in
98 *:*) ifconfig "${IFACE}" inet6 "$@" ;; 103 ifconfig "${IFACE}" ${inet6} alias "$@"
99 *) ifconfig "${IFACE}" "$@" ;;
100 esac
101} 104}
102 105
103_add_route() { 106_add_route() {
104 if [ $# -gt 3 ] ; then 107 if [ $# -gt 3 ] ; then
105 if [ "$3" = "gw" -o "$3" = "via" ] ; then 108 if [ "$3" = "gw" -o "$3" = "via" ] ; then

Legend:
Removed from v.2812  
changed lines
  Added in v.2813

  ViewVC Help
Powered by ViewVC 1.1.20