-
Notifications
You must be signed in to change notification settings - Fork 4
/
sb2rc
55 lines (45 loc) · 1.47 KB
/
sb2rc
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
45
46
47
48
49
50
51
52
53
54
#
# Configuration variables for sb2 - specific to the "emulate" mapping mode.
#
# First argument is "initializing" when this script is included from sb2-init,
# or "starting" when included from the "sb2" script, or name of the command
# wrapper which needs mode-specific parameters ("dpkg", "apt-get", etc),
# and empty otherwise.
sb2rc_mode="$1"
case "$sb2rc_mode" in
initializing)
SB2INIT_CROSS_GCC_PREFIX_LIST=$ARCH-linux-:$ARCH-linux-gnueabi-:$ARCH-linux-gnu-
if [ "$ARCH" != "$MACHINE_ARCH" ]; then
SB2INIT_CROSS_GCC_PREFIX_LIST=$SB2INIT_CROSS_GCC_PREFIX_LIST:$MACHINE_ARCH-linux-:$MACHINE_ARCH-linux-gnueabi-:$MACHINE_ARCH-linux-gnu-
fi
;;
starting)
# Make sure /var/log/apt exists, needed when
# running as "sb2 -eR":
if [ "$SBOX_ROOT_SIMULATION" = "root" -a \
-d $SBOX_TARGET_ROOT/var/log ]; then
if [ ! -d $SBOX_TARGET_ROOT/var/log/apt ]; then
mkdir $SBOX_TARGET_ROOT/var/log/apt
fi
fi
;;
mode_settings)
# If $CREATE_ARGVMODS_USR_BIN_RULES is not empty, some
# mapping rules will be automatically generated for
# programs that belong to the toolchain.
CREATE_ARGVMODS_USR_BIN_RULES="yes"
;;
wrapper_list)
SBOX_WRAPPERS="gdb ldconfig pwd fakeroot"
;;
ldconfig)
# When ldconfig is used at build time, then it must be the case
# that it is used on the build artefacts (with the help of the
# '-n' option), so locking it to the target root would not be
# desired.
sbox_ldconfig_root=/
;;
*)
# Default.
;;
esac