I had got the sources of our init a few weeks ago (thanks to gmobile), and today I've implemented the 'exec' and 'import' commands.
The sources can be found here: http://github.com/Xmister/i5700-xmister-init
A few note:
- It seems exec in imported file not working.
- For me the imported file only worked with "on boot" specified. That was maybe because I imported it within init.rc's "on init" section.
- I've written exec with a 60s timeout, so nothing can freeze the boot process forever.
A few examples:
init.rc:
Code:
.
.
.
# /xbin (busybox) - Mount early for e2fsck
mount squashfs /dev/bml8 /xbin ro loop
.
.
.
exec /xbin/busybox sh -c "e2fsck -fyc /dev/stl5 > /data_check.txt"
mount rfs /dev/stl5 /data nosuid nodev xattr,check=no
mount ext2 /dev/stl5 /data nosuid nodev noatime nodiratime
mount ext4 /dev/stl5 /data nosuid nodev noatime nodiratime barrier=1 data=ordered
.
.
.
import /data/proba.rc
.
.
. proba.rc:
Code:
on boot
write /a.txt a
Bookmarks