Skip to content

Commit

Permalink
Scripts: re-enable buggy core pattern
Browse files Browse the repository at this point in the history
  • Loading branch information
storypku committed Mar 26, 2021
1 parent 81b8664 commit fa4599a
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions scripts/docker_start_user.sh
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,14 @@ function setup_apollo_directories() {
# chown -R "${uid}:${gid}" "${apollo_dir}"
}

# FIXME(infra): This will change core pattern on the host also,
# where the `/apollo` directory may not exist.
function setup_core_pattern() {
if [ -e /proc/sys/kernel ]; then
echo "/apollo/data/core/core_%e.%p" > /proc/sys/kernel/core_pattern
fi
}

##===================== Main ==============================##
function main() {
local user_name="$1"
Expand All @@ -103,6 +111,7 @@ function main() {
setup_user_account_if_not_exist "$@"
setup_apollo_directories "${uid}" "${gid}"
grant_device_permissions "${user_name}"
setup_core_pattern
}

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

0 comments on commit fa4599a

Please sign in to comment.