]> CyberLeo.Net >> Repos - FreeBSD/releng/7.2.git/blob - share/examples/slattach/unit-command.sh
Create releng/7.2 from stable/7 in preparation for 7.2-RELEASE.
[FreeBSD/releng/7.2.git] / share / examples / slattach / unit-command.sh
1 #!/bin/sh
2
3 old_unit=$1
4 new_unit=$2
5
6 if [ $old_unit != -1 ]; then
7         ifconfig sl$old_unit delete down
8         if [ $new_unit == -1 ]; then
9                 route delete default
10         fi
11 fi
12
13 if [ $new_unit != -1 ]; then
14         ifconfig sl$new_unit <address1> <address2>
15         if [ $old_unit == -1 ]; then
16                 route add default <address2>
17         fi
18 fi