Fix perl issues

This commit is contained in:
xenia 2020-03-10 23:53:51 -04:00
parent 56fafc9dd5
commit e361aabe72
2 changed files with 3 additions and 0 deletions

View File

@ -30,6 +30,7 @@ t: test
mkdir $@ mkdir $@
curl -Ss https://course.ccs.neu.edu/cs3700sp20/archive/tcp-sim.tgz | tar xzf - -C $@ curl -Ss https://course.ccs.neu.edu/cs3700sp20/archive/tcp-sim.tgz | tar xzf - -C $@
sed -i '/.usr.bin.sudo/d' .netsim/netsim sed -i '/.usr.bin.sudo/d' .netsim/netsim
cd /usr/include; h2ph -d $(HOME)/perl5/lib/perl5/ -a sys/syscall.h
netsim-shell: .netsim netsim-shell: .netsim
./scripts/create-net-ns.sh ./scripts/create-net-ns.sh

View File

@ -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 \ sudo unshare -n capsh --caps="cap_net_admin+eip cap_setpcap,cap_setuid,cap_setgid+ep" --keep=1 \
--user=$USER --addamb=cap_net_admin \ --user=$USER --addamb=cap_net_admin \
-- -c "export PATH=$PWD/.netsim:\$PATH; export HOME=$PWD; /usr/bin/ip link set lo up; netsim; \ -- -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)" tc qdisc show dev lo; /bin/bash --init-file <(echo unset HISTFILE)"
true true