11 lines
420 B
Bash
Executable File
11 lines
420 B
Bash
Executable File
#!/bin/bash
|
|
|
|
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd)"
|
|
cd $(dirname $DIR)
|
|
|
|
sudo unshare -n capsh --caps="cap_net_admin+eip cap_setpcap,cap_setuid,cap_setgid+ep" --keep=1 \
|
|
--user=$USER --addamb=cap_net_admin \
|
|
-- -c "export PATH=$PWD/.netsim:\$PATH; export HOME=$PWD; /usr/bin/ip link set lo up; netsim; \
|
|
tc qdisc show dev lo; /bin/bash --init-file <(echo unset HISTFILE)"
|
|
true
|