From 5de05d34c3bc4d5c8ce2c39736eed71c32c59726 Mon Sep 17 00:00:00 2001 From: Christopher Roy Bratusek Date: Tue, 1 Sep 2020 21:40:12 +0200 Subject: [PATCH] CommonInstaller: make nanodroid_init setup variable actually work --- CommonInstaller | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/CommonInstaller b/CommonInstaller index 0ff5c6c..fbd8145 100644 --- a/CommonInstaller +++ b/CommonInstaller @@ -1343,11 +1343,15 @@ install_initd () { fi mkdir -p "${INIT_BASE}" - cp "${INSTALLER}/system/etc/init.d"/* "${INIT_BASE}/" - set_perm_bin "${INIT_BASE}" - for init in ${nanodroid_init}; do - installinfo_add "/system/etc/init.d/${init}" + for script in ${nanodroid_init}; do + if [ -f "${INSTALLER}/system/etc/init.d/${script}" ]; then + cp "${INSTALLER}/system/etc/init.d/${script}" "${INIT_BASE}/" + set_perm_bin "${INIT_BASE}/${script}" + installinfo_add "/system/etc/init.d/${init}" + else + ui_print " -- ${script} is not a known init script" + fi done else print_info " << without init scripts" fi