Commit 45dbd446 authored by topjohnwu's avatar topjohnwu

Add general purpose script execution

parent 47225592
...@@ -66,6 +66,14 @@ run_scripts() { ...@@ -66,6 +66,14 @@ run_scripts() {
fi fi
fi fi
done done
for SCRIPT in $COREDIR/${1}.d/* ; do
if [ -f "$SCRIPT" ]; then
chmod 755 $SCRIPT
chcon u:object_r:system_file:s0 $SCRIPT
log_print "${1}.d: $SCRIPT"
sh $SCRIPT
fi
done
} }
loopsetup() { loopsetup() {
...@@ -441,7 +449,7 @@ case $1 in ...@@ -441,7 +449,7 @@ case $1 in
done done
# Stage 4 # Stage 4
log_print "* Stage 4: Execute module scripts" log_print "* Stage 4: Execute scripts"
run_scripts post-fs-data run_scripts post-fs-data
# Stage 5 # Stage 5
......
...@@ -11,7 +11,7 @@ log_print() { ...@@ -11,7 +11,7 @@ log_print() {
log_print "Moving and linking /sbin binaries" log_print "Moving and linking /sbin binaries"
mount -o rw,remount rootfs / mount -o rw,remount rootfs /
/dev/busybox/cp -afc /sbin /sbin_orig cp -af /sbin /sbin_orig
mount -o ro,remount rootfs / mount -o ro,remount rootfs /
log_print "Exposing su binary" log_print "Exposing su binary"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment