#!/bin/bash case $1 in start-pre) /usr/bin/ovs-vsctl --no-wait init ;; start-post) threads=`ps -C ovs-vswitchd --no-headers | wc -l` retry=0 while [ $threads -gt 1 -a $retry -lt 10 ] do echo "wait for parent to exit" retry=$(($retry+1)) sleep 1 threads=`ps -C ovs-vswitchd --no-headers | wc -l` done ;; esac exit 0