nano: Copy nano-related files to /sbin instead of /system
* It seems that when the system partition is mounted, nano cannot access the ramdisk files it needs to, and therefore errors (e.g. error opening terminal: pcansi)
* This patch addresses the said issue by moving the files nano needs to /sbin
Change-Id: I8a19a12a709b5ca20e449810a841ce421c038800
diff --git a/etc/init.recovery.nano.rc b/etc/init.recovery.nano.rc
index f57f656..c8a3abe 100644
--- a/etc/init.recovery.nano.rc
+++ b/etc/init.recovery.nano.rc
@@ -1,3 +1,3 @@
on fs
- export TERMINFO /system/etc/terminfo
+ export TERMINFO /sbin/etc/terminfo
export TERM pcansi
diff --git a/prebuilt/Android.mk b/prebuilt/Android.mk
index 049ebd0..8769926 100644
--- a/prebuilt/Android.mk
+++ b/prebuilt/Android.mk
@@ -641,17 +641,10 @@
LOCAL_MODULE_CLASS := ETC
LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)/sbin
LOCAL_REQUIRED_MODULES := nano libncurses
-ifeq ($(BOARD_BUILD_SYSTEM_ROOT_IMAGE),true)
- LOCAL_POST_INSTALL_CMD += \
- mkdir -p $(TARGET_RECOVERY_ROOT_OUT)/system_root/system/etc/nano; \
- cp -rf external/nano/etc/* external/nano/syntax/*.nanorc $(TARGET_RECOVERY_ROOT_OUT)/system_root/system/etc/nano/; \
- cp -rf external/libncurses/lib/terminfo $(TARGET_RECOVERY_ROOT_OUT)/system_root/system/etc/;
-else
- LOCAL_POST_INSTALL_CMD += \
- mkdir -p $(TARGET_RECOVERY_ROOT_OUT)/system/etc/nano; \
- cp -rf external/nano/etc/* external/nano/syntax/*.nanorc $(TARGET_RECOVERY_ROOT_OUT)/system/etc/nano/; \
- cp -rf external/libncurses/lib/terminfo $(TARGET_RECOVERY_ROOT_OUT)/system/etc/;
-endif
+LOCAL_POST_INSTALL_CMD += \
+ mkdir -p $(TARGET_RECOVERY_ROOT_OUT)/sbin/etc/nano; \
+ cp -rf external/nano/etc/* external/nano/syntax/*.nanorc $(TARGET_RECOVERY_ROOT_OUT)/sbin/etc/nano/; \
+ cp -rf external/libncurses/lib/terminfo $(TARGET_RECOVERY_ROOT_OUT)/sbin/etc/;
include $(BUILD_PHONY_PACKAGE)
ifneq ($(TW_EXCLUDE_BASH), true)