From e361aabe72d0f15a465fbcf076b4bc9eccd90359 Mon Sep 17 00:00:00 2001 From: haskal Date: Tue, 10 Mar 2020 23:53:51 -0400 Subject: [PATCH] Fix perl issues --- Makefile | 1 + scripts/create-net-ns.sh | 2 ++ 2 files changed, 3 insertions(+) diff --git a/Makefile b/Makefile index d4ff4a1..9f62ede 100644 --- a/Makefile +++ b/Makefile @@ -30,6 +30,7 @@ t: test mkdir $@ curl -Ss https://course.ccs.neu.edu/cs3700sp20/archive/tcp-sim.tgz | tar xzf - -C $@ sed -i '/.usr.bin.sudo/d' .netsim/netsim + cd /usr/include; h2ph -d $(HOME)/perl5/lib/perl5/ -a sys/syscall.h netsim-shell: .netsim ./scripts/create-net-ns.sh diff --git a/scripts/create-net-ns.sh b/scripts/create-net-ns.sh index b54edea..a304a9b 100755 --- a/scripts/create-net-ns.sh +++ b/scripts/create-net-ns.sh @@ -6,5 +6,7 @@ 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; \ + export PERL5LIB=\"/home/$USER/perl5/lib/perl5\${PERL5LIB:+:\${PERL5LIB}}\" \ + export PERL_LOCAL_LIB_ROOT=\"/home/$USER/perl5\${PERL_LOCAL_LIB_ROOT:+:\${PERL_LOCAL_LIB_ROOT}}\" \ tc qdisc show dev lo; /bin/bash --init-file <(echo unset HISTFILE)" true