repo.or.cz
/
minix.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
etc/services - sync with NetBSD-8
[minix.git]
/
external
/
bsd
/
blacklist
/
libexec
/
blacklistd-helper
blob
0b9deb93ee3f9a42532c35cef289d0c3730f1e75
1
#!/bin/sh
2
#echo "run $@" 1>&2
3
#set -x
4
# $1 command
5
# $2 rulename
6
# $3 protocol
7
# $4 address
8
# $5 mask
9
# $6 port
10
# $7 id
11
12
case
"
$1
"
in
13
add
)
14
if
[
-n
"
$3
"
];
then
15
proto
=
"proto
$3
"
16
fi
17
if
[
-n
"
$6
"
];
then
18
port
=
"port
$6
"
19
fi
20
exec
/
sbin
/
npfctl rule
$2
add block
in
final
$proto
from
$4
/
$5
to any
$port
21
;;
22
rem
)
23
exec
/
sbin
/
npfctl rule
$2
rem-id
$7
24
;;
25
flush
)
26
exec
/
sbin
/
npfctl rule
$2
flush
27
;;
28
*)
29
echo
"
$0
: Unknown command '
$1
'"
1
>&
2
30
exit
1
31
;;
32
esac