File tree Expand file tree Collapse file tree 1 file changed +18
-2
lines changed Expand file tree Collapse file tree 1 file changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,19 @@ trap cleanup EXIT
21
21
# Default directory where the chroot tree lives:
22
22
CHROOTDIR=" @judgehost_chrootdir@"
23
23
24
+ # Gather which dirs will be mounted during judgement.
25
+ # (optional lib64 only needed for amd64 architecture)
26
+ SUBDIRMOUNTS=" etc usr lib bin"
27
+ if [ " $( uname -m) " = " x86_64" ]; then
28
+ SUBDIRMOUNTS=" $SUBDIRMOUNTS lib64"
29
+ fi
30
+
31
+ CONCAT_SUBDIRMOUNTS=" "
32
+ for subdir in $SUBDIRMOUNTS
33
+ do
34
+ CONCAT_SUBDIRMOUNTS=" ${SUBDIRMOUNTS: +${CONCAT_SUBDIRMOUNTS} , }${subdir} "
35
+ done
36
+
24
37
usage ()
25
38
{
26
39
cat << EOF
@@ -44,6 +57,9 @@ into the chroot tree, and then e.g. run:
44
57
45
58
sudo dj_run_chroot "dpkg -i /path/inside/chroot/package_x.y.z_amd64.deb"
46
59
60
+ Beware that only [$CONCAT_SUBDIRMOUNTS ] are mounted inside the chroot!
61
+ For the current list see the chroot-start-stop.sh in case of issues.
62
+
47
63
EOF
48
64
}
49
65
@@ -93,9 +109,9 @@ mount --bind /dev/pts "$CHROOTDIR/dev/pts"
93
109
# Prevent perl locale warnings in the chroot:
94
110
export LC_ALL=C
95
111
96
- [ -n " $INTERACTIVE " ] && echo " Entering chroot in '$CHROOTDIR '."
97
-
98
112
if [ -n " $INTERACTIVE " ]; then
113
+ echo " Entering chroot in '$CHROOTDIR '."
114
+ echo " Only [$CONCAT_SUBDIRMOUNTS ] will be mounted during judgement. See chroot-start-stop.sh for the current list."
99
115
chroot " $CHROOTDIR "
100
116
else
101
117
chroot " $CHROOTDIR " /bin/sh -c " $* "
You can’t perform that action at this time.
0 commit comments