diff --git a/ChangeLog.md b/ChangeLog.md index 3c69203..0595727 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -20,6 +20,8 @@ * init.d Scripts * move init.d scripts logs from ${MODDIR}/.logs to ${MODDIR}/logs + * make all init.d scripts wait until device fully booted (sys.boot_completed) + * only effects System Mode, already been the case for Magisk Mode before * logscleaner init.d Script * only clean files older than 7 days diff --git a/Full/system/etc/init.d/fstrim b/Full/system/etc/init.d/fstrim index 8e48e18..120def5 100755 --- a/Full/system/etc/init.d/fstrim +++ b/Full/system/etc/init.d/fstrim @@ -1,5 +1,8 @@ #!/system/bin/sh +# wait until boot completed +until [ `getprop sys.boot_completed`. = 1. ]; do sleep 1; done + echo "fstrim init script" if [ -e /init.fstrim.sh ]; then diff --git a/Full/system/etc/init.d/logcat b/Full/system/etc/init.d/logcat index c6b047e..eb9f14a 100755 --- a/Full/system/etc/init.d/logcat +++ b/Full/system/etc/init.d/logcat @@ -1,5 +1,8 @@ #!/system/bin/sh +# wait until boot completed +until [ `getprop sys.boot_completed`. = 1. ]; do sleep 1; done + LOGDIR="${MODDIR}"/logcats echo "logcat init script" diff --git a/Full/system/etc/init.d/logscleaner b/Full/system/etc/init.d/logscleaner index ecd4315..108f766 100755 --- a/Full/system/etc/init.d/logscleaner +++ b/Full/system/etc/init.d/logscleaner @@ -1,5 +1,8 @@ #!/system/bin/sh +# wait until boot completed +until [ `getprop sys.boot_completed`. = 1. ]; do sleep 1; done + echo "logscleaner init script" echo "Starting Automatic Cleaning at $(date +"%m-%d-%Y %H:%M:%S")" diff --git a/Full/system/etc/init.d/sqlite b/Full/system/etc/init.d/sqlite index e476470..64915ab 100755 --- a/Full/system/etc/init.d/sqlite +++ b/Full/system/etc/init.d/sqlite @@ -1,5 +1,8 @@ #!/system/bin/sh +# wait until boot completed +until [ `getprop sys.boot_completed`. = 1. ]; do sleep 1; done + echo "sqlite init script" if which sqlite3 >/dev/null; then