Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix concurrency in init code, fixes #163 #164

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 12 additions & 8 deletions lib/core.sh
Original file line number Diff line number Diff line change
Expand Up @@ -420,15 +420,19 @@ function _provide_bindings_as_user(){
# None
#######################################
function _build_passwd_and_group(){
if ! getent_cmd passwd > ${JUNEST_HOME}/etc/junest/passwd
then
warn "getent command failed or does not exist. Binding directly from /etc/passwd."
cp_cmd /etc/passwd ${JUNEST_HOME}/etc/junest/passwd
if [ ! -f ${JUNEST_HOME}/etc/junest/passwd ] ; then
if ! getent_cmd passwd > ${JUNEST_HOME}/etc/junest/passwd
then
warn "getent command failed or does not exist. Binding directly from /etc/passwd."
cp_cmd /etc/passwd ${JUNEST_HOME}/etc/junest/passwd
fi
fi
if ! getent_cmd group > ${JUNEST_HOME}/etc/junest/group
then
warn "getent command failed or does not exist. Binding directly from /etc/group."
cp_cmd /etc/group ${JUNEST_HOME}/etc/junest/group
if [ ! -f ${JUNEST_HOME}/etc/junest/group ] ; then
if ! getent_cmd group > ${JUNEST_HOME}/etc/junest/group
then
warn "getent command failed or does not exist. Binding directly from /etc/group."
cp_cmd /etc/group ${JUNEST_HOME}/etc/junest/group
fi
fi
}

Expand Down