File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -734,9 +734,16 @@ install_module() {
734734 cp -af $MODPATH /module.prop /data/adb/modules/$MODID /module.prop
735735 fi
736736
737- rc=$( find " $MODPATH " -mindepth 1 -type f -name " *.rc" -print -quit)
737+ find " $MODPATH " -mindepth 1 -type f -name " init.rc" -exec rm -f {} \;
738+ find " $MODPATH " -mindepth 1 -type f -name " *.rc" | while read -r file; do
739+ local path=" ${file/ $MODPATH / } "
740+ if [ ! -f " $path " ]; then
741+ mv " $file " " $MODPATH "
742+ fi
743+ rc=true
744+ done
738745 # Copy over custom sepolicy rules and rc
739- if [ -f $MODPATH /sepolicy.rule ] || [ -n " $rc " ] ; then
746+ if [ -f $MODPATH /sepolicy.rule ] || " $rc " ; then
740747 ui_print " - Installing custom sepolicy rules or rc script"
741748 copy_preinit_files
742749 fi
You can’t perform that action at this time.
0 commit comments