repo.or.cz
/
freebsd-src
/
fkvm-freebsd.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
turns printfs back on
[freebsd-src/fkvm-freebsd.git]
/
share
/
examples
/
slattach
/
unit-command.sh
blob
9e97ffdcd69617076e311172c8b72abc72c69bc3
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