File: with-unshare

package info (click to toggle)
hippotat 1.3.2
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 700 kB
  • sloc: sh: 407; makefile: 132; perl: 84; python: 79; ansic: 34
file content (18 lines) | stat: -rwxr-xr-x 418 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/bash
# Copyright 2021-2022 Ian Jackson and contributors to Hippotat
# SPDX-License-Identifier: GPL-3.0-or-later WITH LicenseRef-Hippotat-OpenSSL-Exception
# There is NO WARRANTY.

set -e
. "${0%/*}"/tcommon


#case "$1" in
#T/*)	prog="$src/test/${1#T/}"; shift; set -- "$prog" "$@" ;;
#esac

unshare -Urnm bash -xec '
	mount -t tmpfs tmpfs /run
	PATH="$PATH:/usr/local/sbin:/sbin:/usr/sbin"
	exec "$@"
' x "$@"