aboutsummaryrefslogtreecommitdiff
path: root/fake-client-setup-mounts.sh
blob: 9ad1e768fd73854ee463c524a83357ab3df8faaf (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/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 -t tmpfs dummy /var/run/nscd 2>/dev/null || true;
unshare "$SHELL_TO_USE"