From de057eb6540cab342ea247834c80953e8cd9de84 Mon Sep 17 00:00:00 2001 From: "Andrey A. Chernov" Date: Sat, 17 Feb 1996 19:36:08 +0000 Subject: [PATCH] -u unit-command example --- share/examples/slattach/unit-command.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100755 share/examples/slattach/unit-command.sh diff --git a/share/examples/slattach/unit-command.sh b/share/examples/slattach/unit-command.sh new file mode 100755 index 00000000000..9e97ffdcd69 --- /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 + if [ $old_unit == -1 ]; then + route add default + fi +fi