23 lines
339 B
Bash
23 lines
339 B
Bash
|
#!/usr/bin/env sh
|
||
|
|
||
|
run() {
|
||
|
printf '$ \x1b[32;1m%s\x1b[0m\n' "$*"
|
||
|
"$@"
|
||
|
}
|
||
|
step() {
|
||
|
printf '\x1b[34;1m>> %s\x1b[0m\n' "$*"
|
||
|
}
|
||
|
|
||
|
getval() {
|
||
|
/var/lib/inet2/config.awk /etc/inet2.conf "$@"
|
||
|
}
|
||
|
|
||
|
haskey() {
|
||
|
getval interface | while read -r inter; do
|
||
|
if getval "interface $inter" "$1"; then
|
||
|
echo "true"
|
||
|
return
|
||
|
fi
|
||
|
done
|
||
|
}
|