From 1aaa614ff414f984d80aa24d01c3a9bd7ac28f11 Mon Sep 17 00:00:00 2001 From: zhong_ning Date: Wed, 8 Sep 2021 10:34:32 +0800 Subject: [PATCH] delete invalid cmds and modify reboot Signed-off-by: zhong_ning --- services/etc/init.cfg | 28 ---------------------------- services/src/init_reboot.c | 1 + 2 files changed, 1 insertion(+), 28 deletions(-) diff --git a/services/etc/init.cfg b/services/etc/init.cfg index f435edbd..f32a7bbb 100755 --- a/services/etc/init.cfg +++ b/services/etc/init.cfg @@ -29,10 +29,7 @@ "symlink /proc/self/fd/0 /dev/stdin", "symlink /proc/self/fd/1 /dev/stdout", "symlink /proc/self/fd/2 /dev/stderr", - "symlink /system/bin /bin", - "symlink /system/etc /etc", "symlink /sys/kernel/debug /d", - "symlink /system/vendor /vendor", "mkdir /dev/stune/foreground", "mkdir /dev/stune/background", "mkdir /dev/stune/top-app", @@ -182,22 +179,11 @@ "hostname localhost", "domainname localdomain" ] - }, { - "name" : "param:sys.boot_from_charger_mode=1", - "condition" : "sys.boot_from_charger_mode=1", - "cmds" : [ - "trigger post-init" - ] }, { "name" : "load_persist_props_action", "cmds" : [ "load_persist_params load_persist_params" ] - }, { - "name" : "firmware_mounts_complete", - "cmds" : [ - "rm /dev/.booting" - ] }, { "name" : "post-init", "cmds" : [ @@ -255,20 +241,6 @@ "mkdir /data/app-staging 0750 system system", "copy /data/system/entropy.dat /dev/urandom", "mkdir /data/misc 01771 system misc", - "mkdir /data/misc/recovery 0770 system log", - "copy /data/misc/recovery/ro.build.fingerprint /data/misc/recovery/ro.build.fingerprint.1", - "chmod 0440 /data/misc/recovery/ro.build.fingerprint.1", - "chown system log /data/misc/recovery/ro.build.fingerprint.1", - "write /data/misc/recovery/ro.build.fingerprint ${ro.build.fingerprint}", - "chmod 0440 /data/misc/recovery/ro.build.fingerprint", - "chown system log /data/misc/recovery/ro.build.fingerprint", - "mkdir /data/misc/recovery/proc 0770 system log", - "copy /data/misc/recovery/proc/version /data/misc/recovery/proc/version.1", - "chmod 0440 /data/misc/recovery/proc/version.1", - "chown system log /data/misc/recovery/proc/version.1", - "copy /proc/version /data/misc/recovery/proc/version", - "chmod 0440 /data/misc/recovery/proc/version", - "chown system log /data/misc/recovery/proc/version", "mkdir /data/misc/bluedroid 02770 bluetooth bluetooth", "chmod 0660 /data/misc/bluedroid/bt_config.conf", "chown bluetooth bluetooth /data/misc/bluedroid/bt_config.conf", diff --git a/services/src/init_reboot.c b/services/src/init_reboot.c index e1b285c7..7a2e25f8 100644 --- a/services/src/init_reboot.c +++ b/services/src/init_reboot.c @@ -212,6 +212,7 @@ void DoReboot(const char *value) return; } StopAllServicesBeforeReboot(); + sync(); if (GetMountStatusForMountPoint("/vendor") != 0) { if (umount("/vendor") != 0) { INIT_LOGE("DoReboot umount vendor failed! errno = %d.", errno); -- GitLab