#!/bin/bash # gNB entrypoint with M-Plane NETCONF server # # Starts the M-Plane server alongside the gNB process. # The M-Plane server acts as an O-RU NETCONF endpoint, # translating o-ran-uplane-conf edit-config to internal antenna control. # # Usage: gnb-mplane-entrypoint.sh # Example: gnb-mplane-entrypoint.sh /oai-ran/.../nr-softmodem -O /opt/.../gnb.conf --rfsim set -e echo "[gnb-mplane] Starting M-Plane NETCONF server (port ${MPLANE_PORT:-831})..." python3 /opt/mplane/mplane_server.py & MPLANE_PID=$! # Give the M-Plane server a moment to start sleep 1 if ! kill -0 $MPLANE_PID 2>/dev/null; then echo "[gnb-mplane] WARNING: M-Plane server failed to start, continuing without it" fi # Run the gNB command (passed as arguments) echo "[gnb-mplane] Starting gNB: $@" exec "$@"