Welcome to mirror list, hosted at ThFree Co, Russian Federation.

empty-netns-prep.sh « test - github.com/checkpoint-restore/criu.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 07e7e8f450ec468c6da394712f7531746c262ff6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/bash

set -ex

if [ "$CRTOOLS_SCRIPT_ACTION" == "setup-namespaces" ]; then
	echo "Will up lo at $CRTOOLS_INIT_PID netns"
	mkdir -p /var/run/netns
	mount -t tmpfs xxx /var/run/netns
	touch /var/run/netns/emptyns
	mount --bind /proc/$CRTOOLS_INIT_PID/ns/net /var/run/netns/emptyns
	ip netns exec emptyns ip link set up dev lo || exit 1
	ip netns exec emptyns ip a
	umount -l /var/run/netns
fi

exit 0