#!/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