echo "initdone"
initdone
west #
 IPSEC_DIR=/etc/ipsec.d/
west #
 IPSEC_TEST_DIR=/tmp/TESTipsec.d
west #
 mkdir ${IPSEC_TEST_DIR}
west #
 rm -f ${IPSEC_DIR}/*.db
west #
 ipsec initnss --nssdir ${IPSEC_TEST_DIR}
Initializing NSS database
Warning no default label for /tmp/TESTipsec.d
west #
 find ${IPSEC_DIR}      -name '*.db' | sort  # should show no db files
west #
 find ${IPSEC_TEST_DIR} -name '*.db' | sort  # should show db files
/tmp/TESTipsec.d/cert9.db
/tmp/TESTipsec.d/key4.db
west #
 ipsec checknss --nssdir ${IPSEC_TEST_DIR}
west #
 find ${IPSEC_DIR}      -name '*.db' | sort  # should show no db files
west #
 find ${IPSEC_TEST_DIR} -name '*.db' | sort  # should show db files
/tmp/TESTipsec.d/cert9.db
/tmp/TESTipsec.d/key4.db
west #
 ipsec newhostkey --nssdir ${IPSEC_TEST_DIR}
Generated RSA key pair with CKAID <<CKAID#1>> was stored in the NSS database
The public key can be displayed using: ipsec showhostkey --left --ckaid <<CKAID#1>>
west #
 rm -rf ${IPSEC_TEST_DIR}
west #
 

