aboutsummaryrefslogtreecommitdiff
path: root/fake-client-setup-mounts.sh
blob: f2e5866e66e306e8c4d5a2d2ae32035c692da40b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/sh

# SPDX-License-Identifier: CC0-1.0

# Copyright (C) 2022 Wojtek Kosior <koszko@koszko.org>
#
# Available under the terms of Creative Commons Zero v1.0 Universal.

set -e

SHELL_TO_USE="$1"

mount --bind hosts /etc/hosts
mount --bind test-ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
mount -t tmpfs dummy /var/run/nscd 2>/dev/null || true;
unshare "$SHELL_TO_USE"