Add DragonFly-stable-supfile and cleanup the comments in it and
[dragonfly.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