16 lines
352 B
Bash
Executable File
16 lines
352 B
Bash
Executable File
#!/bin/sh
|
|
# $NetBSD: script,v 1.1 2001/04/25 03:43:35 garbled Exp $
|
|
|
|
if [ "$1" = "both" -o "$1" = "boot" ]; then
|
|
echo "$2" >/etc/mygate
|
|
fi
|
|
if [ "$1" = "both" -o "$1" = "now" ]; then
|
|
route delete default
|
|
route add default $2
|
|
fi
|
|
if [ "$?" = "0" ]; then
|
|
echo "Default route has been changed to $2"
|
|
else
|
|
echo "Failed to change default route to $2"
|
|
fi
|