#!/bin/sh
# This file is part of secnet.
# See LICENCE and this file CREDITS for full list of copyright holders.
# SPDX-License-Identifier: GPL-3.0-or-later
# There is NO WARRANTY.

set -e
echo >&2 "$0: invoked as $0 $*"
shift
shift
exec 3<&0 4>&1 5>&2 >&2 </dev/null
exec xterm -T netns -e unshare -n -- sh -xc '
  ../userv-utils.git/ipif/service \* -- "$@" <&3 >&4 2>&5 &
  sleep 0.1
  env - bash -i
' x "$@"
