|
root / base / usr / src / zyginit / services / ipsec / start.sh
start.sh Bash 11 lines 500 B
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
#!/bin/sh
# IPsec setup. Three steps, executed only when their input is present:
#   1. ipsecalgs -s     — load algorithm table from /etc/inet/ipsecalgs
#   2. ipseckey -f ...  — install static SAs (skip if no keyfile)
#   3. ipsecconf -q -a  — install policy DB (skip if no config)
set -e
/usr/sbin/ipsecalgs -s
[ -s /etc/inet/secret/ipseckeys ] && /usr/sbin/ipseckey -f /etc/inet/secret/ipseckeys
[ -s /etc/inet/ipsecinit.conf ]   && /usr/sbin/ipsecconf -q -a /etc/inet/ipsecinit.conf
exit 0