#!/bin/sh

set -eu

# A mock of mount(8) for the ikvswitch unit tests: it fills the mount
# point with the fake switch rootfs from ${IKV_MOCK_ROOTFS}, which is
# what the script will then customize. Requires IKV_MOCK_ROOTFS to be
# set.

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

cp -a "${IKV_MOCK_ROOTFS}/." "$2/"
