diff options
| author | Andrey A. Chernov <ache@FreeBSD.org> | 1996-02-17 19:36:08 +0000 |
|---|---|---|
| committer | Andrey A. Chernov <ache@FreeBSD.org> | 1996-02-17 19:36:08 +0000 |
| commit | de057eb6540cab342ea247834c80953e8cd9de84 (patch) | |
| tree | ec59f6849de9a04f37c95ee83e68fb5e91bcbebc /share/examples/slattach/unit-command.sh | |
| parent | 438a2cf9d4bcbc7f238a135b0c6b03213dc8d97f (diff) | |
Notes
Diffstat (limited to 'share/examples/slattach/unit-command.sh')
| -rwxr-xr-x | share/examples/slattach/unit-command.sh | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/share/examples/slattach/unit-command.sh b/share/examples/slattach/unit-command.sh new file mode 100755 index 000000000000..9e97ffdcd696 --- /dev/null +++ b/share/examples/slattach/unit-command.sh @@ -0,0 +1,18 @@ +#!/bin/sh + +old_unit=$1 +new_unit=$2 + +if [ $old_unit != -1 ]; then + ifconfig sl$old_unit delete down + if [ $new_unit == -1 ]; then + route delete default + fi +fi + +if [ $new_unit != -1 ]; then + ifconfig sl$new_unit <address1> <address2> + if [ $old_unit == -1 ]; then + route add default <address2> + fi +fi |
