Set an absolute path in rootwrap filters_path
If a relative path is set in rootwrap filters_path, the rootwrap command must be executed from the neutron root directory. Some commands, like those execute by RootHelperProcess, do not have a defined working directory. To avoid the problems present in the related bug, an absolute path is set in the rootwrap configuration. Related-Bug: #1862927 Change-Id: I02ce4d6b84242c42ec26954eeb9b776cb779bff4
This commit is contained in:
parent
7a0e5185c6
commit
2dd6222198
@ -42,6 +42,8 @@ dst_conf_path=${target_etc_path}/neutron
|
||||
dst_conf=${dst_conf_path}/rootwrap.conf
|
||||
dst_rootwrap_path=${dst_conf_path}/rootwrap.d
|
||||
|
||||
absolute_neutron_path=$(pwd)
|
||||
|
||||
if [[ -d "$dst_rootwrap_path" ]]; then
|
||||
rm -rf ${dst_rootwrap_path}
|
||||
fi
|
||||
@ -49,7 +51,7 @@ mkdir -p -m 755 ${dst_rootwrap_path}
|
||||
|
||||
cp -p ${src_rootwrap_path}/* ${dst_rootwrap_path}/
|
||||
cp -p ${src_conf} ${dst_conf}
|
||||
sed -i "s:^filters_path=.*$:filters_path=${dst_rootwrap_path}:" ${dst_conf}
|
||||
sed -i "s:^filters_path=.*$:filters_path=${absolute_neutron_path}/${dst_rootwrap_path}:" ${dst_conf}
|
||||
sed -i "s:^exec_dirs=\(.*\)$:exec_dirs=${target_bin_path},${fullstack_path},\1:" ${dst_conf}
|
||||
|
||||
if [[ "$OS_SUDO_TESTING" = "1" ]]; then
|
||||
|
Loading…
Reference in New Issue
Block a user