File: getent

package info (click to toggle)
netbase 6.5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 160 kB
  • sloc: sh: 61; makefile: 15
file content (24 lines) | stat: -rwxr-xr-x 651 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/bash -e
set -o pipefail

getent rpc mountd || { echo "getent rpc failed!" >&2; exit 1; }

if ! getent rpc mountd | egrep -q '^mountd[ \t]+100005[ \t]'; then
  echo "getent rpc returned something wrong!" >&2
  exit 1
fi

getent services https || { echo "getent services failed!" >&2; exit 1; }

if ! getent services https | egrep -q '^https[ \t]+443/tcp$'; then
  echo "getent services returned something wrong!" >&2
  exit 1
fi

getent protocols vrrp || { echo "getent protocols failed!" >&2; exit 1; }

if ! getent protocols vrrp | egrep -q '^vrrp[ \t]+112[ \t]VRRP$'; then
  echo "getent protocols returned something wrong!" >&2
  exit 1
fi