5088N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5088N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5088N/A if [[ ! -d ${OVS_TMP_DIR} ]]; then
5088N/A ${PFEXEC} ${MKDIR} -m 775 ${OVS_TMP_DIR} || exit $SMF_EXIT_ERR_CONFIG
5088N/A typeset -i OVSDB_INIT=0
5088N/A typeset -r OVSDB_DATABASE=${OVS_VARLIB_DIR}/etc/conf.db
5088N/A if [[ ! -f ${OVSDB_DATABASE} ]]; then
5088N/A typeset -r OVSDB_SCHEMA=${OVS_USRLIB_DIR}/share/vswitch.ovsschema
5088N/A ${OVSDB_TOOL} create ${OVSDB_DATABASE} ${OVSDB_SCHEMA}
5088N/A typeset -r OVSDB_LOGFILE=${OVS_LOG_DIR}/ovsdb-server.log
5088N/A typeset -r OVSDB_PIDFILE=${OVS_TMP_DIR}/ovsdb-server.pid
5088N/A ${OVSDB_SERVER_PATH} ${OVSDB_DATABASE} \
5088N/A --remote=punix:${OVSDB_REMOTE} \
5088N/A --pidfile=${OVSDB_PIDFILE} \
5088N/A if [ ${OVSDB_INIT} -ne 0 ]; then
5088N/A typeset BRIDGENAME
5088N/A while read BRIDGENAME; do
6734N/A ${OVS_CLEAN_PATH} delete-vnic ${BRIDGENAME} >/dev/null 2>&1
6734N/A typeset BRIDGENAME
6734N/A clean_vswitch stop
5088N/A typeset -r VSWITCHD_LOGFILE=${OVS_LOG_DIR}/ovs-vswitchd.log
5088N/A typeset -r VSWITCHD_PIDFILE=${OVS_TMP_DIR}/ovs-vswitchd.pid
6734N/A ${PFEXEC} ${OVS_VSWITCHD_PATH} unix:${OVSDB_REMOTE} \
5088N/A --log-file=${VSWITCHD_LOGFILE} \
5088N/A --pidfile=${VSWITCHD_PIDFILE} \
5728N/A while read BRIDGENAME; do
5088N/Aexit $SMF_EXIT_OK