#!/bin/sh

set -eu

# A mock of start-stop-daemon(8) for the ikvswitch unit tests:
# ikvswitch-setup uses it to spawn ipmi_sim, which cannot run inside
# the test sandbox. It logs its arguments to ${IKV_MOCK_SSD_LOG} and
# pretends it started the daemon, so that a full "start" run completes
# with a zero exit code. Requires IKV_MOCK_SSD_LOG to be set.

: "${IKV_MOCK_SSD_LOG:?IKV_MOCK_SSD_LOG must be set}"

echo "$@" >>"${IKV_MOCK_SSD_LOG}"
exit 0
