chiark / gitweb /
Apply OpenSSL exception to Hippotat files
[hippotat.git] / test / with-unshare
1 #!/bin/bash
2 # Copyright 2021-2022 Ian Jackson and contributors to Hippotat
3 # SPDX-License-Identifier: GPL-3.0-or-later WITH LicenseRef-Hippotat-OpenSSL-Exception
4 # There is NO WARRANTY.
5
6 set -e
7 . "${0%/*}"/common
8
9
10 #case "$1" in
11 #T/*)   prog="$src/test/${1#T/}"; shift; set -- "$prog" "$@" ;;
12 #esac
13
14 unshare -Urnm bash -xec '
15         mount -t tmpfs tmpfs /run
16         PATH="$PATH:/usr/local/sbin:/sbin:/usr/sbin"
17         exec "$@"
18 ' x "$@"