Add missing init.rc files for recovery. Cleanup init symbolic links. Comment out removing the source file in relink.sh because we need to retain files in /system in the ramdisk. Change-Id: Ie959024296738538f3b3161e38027a44525b0696 Change-Id: I5b1a744414b88a9a15c56bd81f37091664d5cdf1
30 lines
555 B
Bash
Executable File
30 lines
555 B
Bash
Executable File
#!/bin/bash
|
|
|
|
process_file()
|
|
{
|
|
dst=$1/$(basename $2)
|
|
src=$2
|
|
|
|
if [ ! -e $src ]; then
|
|
return
|
|
fi
|
|
|
|
if [ $dst == $src ]; then
|
|
cp -f -p $src $src.tmp
|
|
src=$2.tmp
|
|
else
|
|
cp -f -p --remove-destination $src $dst
|
|
fi
|
|
|
|
sed "s|/system/bin/linker64\x0|/sbin/linker64\x0\x0\x0\x0\x0\x0\x0|g" $src | sed "s|/system/bin/linker\x0|/sbin/linker\x0\x0\x0\x0\x0\x0\x0|g" | sed "s|/system/bin/sh\x0|/sbin/sh\x0\x0\x0\x0\x0\x0\x0|g" > $dst
|
|
#rm -f $src
|
|
}
|
|
|
|
|
|
dest=$1
|
|
shift 1
|
|
for ARG in $*
|
|
do
|
|
process_file $dest $ARG
|
|
done
|