Skip to content

Commit 9f7e1fd

Browse files
authored
chore: remove core pattern and device setup (#117)
1 parent 183f121 commit 9f7e1fd

File tree

1 file changed

+0
-29
lines changed

1 file changed

+0
-29
lines changed

scripts/docker_start_user.sh

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -67,40 +67,13 @@ function setup_user_account_if_not_exist() {
6767
setup_user_bashrc "${uid}" "${gid}" "${user_name}"
6868
}
6969

70-
function grant_device_permissions() {
71-
# setup GPS device
72-
[ -e /dev/novatel0 ] && chmod a+rw /dev/novatel0
73-
[ -e /dev/novatel1 ] && chmod a+rw /dev/novatel1
74-
[ -e /dev/novatel2 ] && chmod a+rw /dev/novatel2
75-
76-
[ -e /dev/ttyACM0 ] && chmod a+rw /dev/ttyACM0
77-
[ -e /dev/imu ] && chmod a+rw /dev/imu
78-
79-
# setup camera device
80-
[ -e /dev/camera/obstacle ] && chmod a+rw /dev/camera/obstacle
81-
[ -e /dev/camera/trafficlights ] && chmod a+rw /dev/camera/trafficlights
82-
83-
# setup audio device
84-
[ -e /dev/snd ] && usermod -a -G audio "$1"
85-
86-
true
87-
}
88-
8970
function setup_apollo_directories() {
9071
local apollo_dir="/opt/apollo"
9172
[[ -d "${apollo_dir}" ]] || mkdir -p "${apollo_dir}"
9273
# chown -R "${uid}:${gid}" "${apollo_dir}"
9374
chmod a+rw /opt /opt/apollo
9475
}
9576

96-
# FIXME(infra): This will change core pattern on the host also,
97-
# where the `/apollo` directory may not exist.
98-
function setup_core_pattern() {
99-
if [[ -w /proc/sys/kernel/core_pattern ]]; then
100-
echo "/apollo/data/core/core_%e.%p" > /proc/sys/kernel/core_pattern
101-
fi
102-
}
103-
10477
##===================== Main ==============================##
10578
function main() {
10679
local user_name="$1"
@@ -116,8 +89,6 @@ function main() {
11689
fi
11790
setup_user_account_if_not_exist "$@"
11891
setup_apollo_directories "${uid}" "${gid}"
119-
grant_device_permissions "${user_name}"
120-
setup_core_pattern
12192
}
12293

12394
main "${DOCKER_USER}" "${DOCKER_USER_ID}" "${DOCKER_GRP}" "${DOCKER_GRP_ID}"

0 commit comments

Comments
 (0)