Backend: fix /system/bin/* execution on recoveries using LD_CONFIG_FILE

This commit is contained in:
osm0sis committed 2020-02-03 17:07:08 -04:00
1 parent ccb19a8337
commit 3e5c6ba739
1 file changed
+3 -1
+3 -1
View File
@@ -145,7 +145,8 @@ setup_env() {
mount_all; mount_all;
OLD_LD_PATH=$LD_LIBRARY_PATH; OLD_LD_PATH=$LD_LIBRARY_PATH;
OLD_LD_PRE=$LD_PRELOAD; OLD_LD_PRE=$LD_PRELOAD;
unset LD_LIBRARY_PATH LD_PRELOAD; OLD_LD_CFG=$LD_CONFIG_FILE;
unset LD_LIBRARY_PATH LD_PRELOAD LD_CONFIG_FILE;
if [ ! "$(getprop 2>/dev/null)" ]; then if [ ! "$(getprop 2>/dev/null)" ]; then
getprop() { getprop() {
local propdir propfile propval; local propdir propfile propval;
@@ -167,6 +168,7 @@ restore_env() {
unset -f getprop; unset -f getprop;
test "$OLD_LD_PATH" && export LD_LIBRARY_PATH=$OLD_LD_PATH; test "$OLD_LD_PATH" && export LD_LIBRARY_PATH=$OLD_LD_PATH;
test "$OLD_LD_PRE" && export LD_PRELOAD=$OLD_LD_PRE; test "$OLD_LD_PRE" && export LD_PRELOAD=$OLD_LD_PRE;
test "$OLD_LD_CFG" && export LD_CONFIG_FILE=$OLD_LD_CFG;
umount_all; umount_all;
(for dir in /apex /system /system_root; do (for dir in /apex /system /system_root; do
if [ -L "${dir}_link" ]; then if [ -L "${dir}_link" ]; then