copy factory app_init.sh to allow user modifications

This commit is contained in:
Alfonso Gamboa 2022-06-14 22:15:34 -07:00
parent f4af3ddb21
commit ddecaa13f8

View File

@ -124,6 +124,13 @@ sed -i '/system\/\lib/s/$/:\/opt\/wz_mini\/lib/' /opt/wz_mini/tmp/.storage/rcS
#sed -i '/^# Run init script.*/i#Hook Library PATH here\nexport LD_LIBRARY_PATH=/tmp/test/lib:$LD_LIBRARY_PATH\n' /opt/wz_mini/tmp/.storage/rcS #sed -i '/^# Run init script.*/i#Hook Library PATH here\nexport LD_LIBRARY_PATH=/tmp/test/lib:$LD_LIBRARY_PATH\n' /opt/wz_mini/tmp/.storage/rcS
#sed -i '/^# Run init script.*/i#Hook system PATH here\nexport PATH=/tmp/test/bin:$PATH\n' /opt/wz_mini/tmp/.storage/rcS #sed -i '/^# Run init script.*/i#Hook system PATH here\nexport PATH=/tmp/test/bin:$PATH\n' /opt/wz_mini/tmp/.storage/rcS
echo "Copy factory app_init.sh"
cp /system/init/app_init.sh /opt/wz_mini/tmp/.storage/app_init.sh
echo "Replace factory app_init.sh path"
sed -i '/Run init script.*/a /opt/wz_mini/tmp/.storage/app_init.sh' /opt/wz_mini/tmp/.storage/rcS
sed -i '/\/system\/init\/app_init.sh/,+2d' /opt/wz_mini/tmp/.storage/rcS
echo "replace stock password" echo "replace stock password"
cp /opt/wz_mini/etc/shadow /opt/wz_mini/tmp/.storage/shadow cp /opt/wz_mini/etc/shadow /opt/wz_mini/tmp/.storage/shadow