aboutsummaryrefslogtreecommitdiffstats
path: root/build/bin/entrypoint
blob: 77084a3602af68931714f781ef9a05c838c655e9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/sh -e

cmd=${1:-""}

case ${cmd} in
   "cni")
      CNI_BIN_DIR="/host/opt/cni/bin"
      OVN4NFV_CONF_DIR="/host/etc/openvswitch"
      OVN4NFV_BIN_FILE="/usr/local/bin/ovn4nfvk8s-cni"
      OVN4NFV_CONF_FILE="/tmp/ovn4nfv-conf/ovn4nfv_k8s.conf"
      cp -f $OVN4NFV_BIN_FILE $CNI_BIN_DIR
      cp -f $OVN4NFV_CONF_FILE $OVN4NFV_CONF_DIR
      # Sleep forever.
      sleep infinity
      ;;

    "operator")
      shift
      exec ${OPERATOR} $@
      ;;

    "agent")
      shift
      exec ${AGENT} $@
      ;;


    *)
      echo "invalid command ${cmd}"

esac