-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnm.sh
More file actions
executable file
·35 lines (28 loc) · 874 Bytes
/
nm.sh
File metadata and controls
executable file
·35 lines (28 loc) · 874 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/bin/bash -x
# SPDX-License-Identifier: Apache-2.0
TAG="nm-c10s"
NAME="nm-c10s"
if [ "CHK$1" == "CHKc9s" ];then
TAG="nm-c9s"
NAME="nm-c9s"
elif [ "CHK$1" == "CHKc10s" ];then
TAG="nm-c10s"
NAME="nm-c10s"
fi
IMAGE="quay.io/nmstate/test-env:$TAG"
CONTAINER_ID=`podman run --systemd=true --privileged -d \
--hostname $NAME \
$IMAGE `
podman exec -i $CONTAINER_ID \
/bin/bash -c \
'systemctl start systemd-udevd;
while ! systemctl is-active systemd-udevd; do sleep 1; done'
podman exec -i $CONTAINER_ID \
/bin/bash -c \
'systemctl restart NetworkManager;
while ! systemctl is-active NetworkManager; do sleep 1; done'
podman exec -i $CONTAINER_ID \
/bin/bash -c 'sysctl -w net.ipv6.conf.all.disable_ipv6=0'
podman exec -it $CONTAINER_ID /bin/bash
podman rm $CONTAINER_ID -f
echo "Container deleted"