forked from inclavare-containers/deterministic-builds
-
Notifications
You must be signed in to change notification settings - Fork 0
/
start.sh
executable file
·44 lines (34 loc) · 814 Bytes
/
start.sh
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
36
37
38
39
40
41
42
43
44
#!/bin/bash
if [[ `whoami` != "root" ]]; then
echo "Should run in root"
exit 1
fi
PRELOAD_DIR_PATH="./preload/"
PRELOAD_SO_NAME="modify_time.so"
BPF_DIR_PATH="./bpf/src/"
BPF_Apps=('modify_time' 'modify_file_timestamp' 'modify_file_read' 'preload_filter' 'modify_file_name' 'modify_random')
set -x
cd $PRELOAD_DIR_PATH
make
cd ..
cd $BPF_DIR_PATH
make
cd ../..
if [[ ! (-e "${PRELOAD_DIR_PATH}${PRELOAD_SO_NAME}") ]]; then
echo "${PRELOAD_DIR_PATH}${PRELOAD_SO_NAME} not exist, exit"
exit 1
fi
for app in "${BPF_Apps[@]}"; do
echo $app
if [[ ! (-e "${BPF_DIR_PATH}${app}") ]]; then
echo "${BPF_DIR_PATH}${app} not exist, exit"
exit 1
fi
done
for app in "${BPF_Apps[@]}"; do
${BPF_DIR_PATH}${app} &
done
cd ${PRELOAD_DIR_PATH}
./load_modify.sh
cd ..
set +x