TT#47373 Cleanups for global permissions fix

- Remove a spurious trailing ';'.
- Make the hook directory reaction conditional on whether we are running
  from within a testsuite, to restore its otherwise fatal treatment.

Change-Id: I3f8a5364d7b2f0ac82bfdc132b94641603225f85
Fixes: commit 505d6566d8
changes/48/25048/2
Guillem Jover 8 years ago
parent 505d6566d8
commit 0bc0550138

@ -65,8 +65,13 @@ hook_setup() {
fi
if ! [ -d "$target_directory" ] ; then
log_error "Hook target directory $target_directory not a directory. Creating it."
mkdir -p "$target_directory"
if [ "${NGCP_TESTSUITE}" = "true" ]; then
log_info "Hook target directory $target_directory not a directory. Creating it."
mkdir -p "$target_directory"
else
log_error "Hook target directory $target_directory not a directory. Exiting."
exit 1
fi
fi
for hook in "${HOOKS}"/* ; do

@ -133,7 +133,7 @@ else
fi
ngcpcfg_update_perms
trap 'ngcpcfg_restore_perms;' ERR EXIT
trap 'ngcpcfg_restore_perms' ERR EXIT
case ${1:-} in
apply|\

@ -19,6 +19,7 @@ def ngcpcfgcli(tmpdir, *args):
'HOOKS': '../hooks/',
'PERL5LIB': '../lib/',
'NGCP_SOCKETFILE': '/tmp/ngcpcfg.socket',
'NGCP_TESTSUITE': 'true',
}
testenv.update(env)

Loading…
Cancel
Save