1 votes

Comment exécuter 2 scripts shell à partir d'un disque RAM ?

J'essaie de configurer mon disque RAM pour lancer deux jeux de scripts. 1 est ramdisk /sbin seulement, les autres sont des scripts autorisés par l'utilisateur.

# Check Properties
on property:dp.early_init.done=1
    chmod 0777 /data/dp_scripts/onearlyinit.sh
    exec /data/dp_scripts/onearlyinit.sh &
    start dp_early_init

on property:dp.init.done=1
    chmod 0777 /data/dp_scripts/oninit.sh
    exec /data/dp_scripts/oninit.sh &
    start dp_init

on property:dp.late_init.done=1
    chmod 0777 /data/dp_scripts/onlateinit.sh
    exec /data/dp_scripts/onlateinit.sh &
    start dp_late_init

on property:dp.post_fs.done=1
    chmod 0777 /data/dp_scripts/onpostfs.sh
    exec /data/dp_scripts/onpostfs.sh &
    start dp_post_fs

on property:dp.post_fs_data.done=1
    chmod 0777 /data/dp_scripts/onpostfsdata.sh
    exec /data/dp_scripts/onpostfsdata.sh &
    start dp_post_fs_data

on property:dp.boot.done=1
    chmod 0777 /data/dp_scripts/onboot.sh
    exec /data/dp_scripts/onboot.sh &
    start dp_boot

on property:sys.boot_completed=1
    chmod 0777 /data/dp_scripts/onpostboot.sh
    exec /data/dp_scripts/onpostboot.sh &
    export PATH /sbin:/system/bin
    start dp_post_boot

on property:sys.shutdown.requested=1
    chmod 0777 /data/dp_scripts/onshutdown.sh
    exec /data/dp_scripts/onshutdown.sh &
    start dp_shutdown

# DP Services
service dp_early_init /sbin/bash /sbin/0/onearlyinit.sh
    user root
    disabled
    oneshot

service dp_init /sbin/bash /sbin/0/oninit.sh
    user root
    disabled
    oneshot

service dp_late_init /sbin/bash /sbin/0/onlateinit.sh
    user root
    disabled
    oneshot

service dp_post_fs /sbin/bash /sbin/0/onpostfs.sh
    user root
    disabled
    oneshot

service dp_post_fs_data /sbin/bash /sbin/0/onpostfsdata.sh
    user root
    disabled
    oneshot

service dp_boot /sbin/bash /sbin/0/onboot.sh
    user root
    disabled
    oneshot

service dp_post_boot /sbin/bash /sbin/0/onpostboot.sh
    class late_start
    user root
    disabled
    oneshot

service dp_shutdown /sbin/bash /sbin/0/onshutdown.sh
    user root
    disabled
    oneshot

Bien que les services eux-mêmes soient tous en feu, l'exécution de la /data/dp_scripts/* Les scripts n'arrivent jamais.

Il s'agit d'un noyau lollipop, fonctionnant sur un Note 3.

Comment puis-je forcer l'exécution de /data/dp_scripts/* aux moments spécifiés ?

0voto

Matt Boehm Points 1162

Ceci semble faire l'affaire

# Check Properties
on property:dp.early_init.done=1
    start dp_early_init
    start dpu_early_init

on property:dp.init.done=1
    start dp_init
    start dpu_init

on property:dp.late_init.done=1
    start dp_late_init
    start dpu_late_init

on property:dp.post_fs.done=1
    start dp_post_fs
    start dpu_post_fs

on property:dp.post_fs_data.done=1
    start dp_post_fs_data
    start dpu_post_fs_data

on property:dp.boot.done=1
    start dp_boot
    start dpu_boot

on property:sys.boot_completed=1
    export PATH /sbin:/system/bin
    start dp_post_boot
    start dpu_post_boot

on property:sys.shutdown.requested=1
    start dp_shutdown
    start dpu_shutdown

# DP User Services
service dpu_early_init /sbin/bash /data/dp_scripts/onearlyinit.sh
    user root
    disabled
    oneshot

service dpu_init /sbin/bash /data/dp_scripts/oninit.sh
    user root
    disabled
    oneshot

service dpu_late_init /sbin/bash /data/dp_scripts/onlateinit.sh
    user root
    disabled
    oneshot

service dpu_post_fs /sbin/bash /data/dp_scripts/onpostfs.sh
    user root
    disabled
    oneshot

service dpu_post_fs_data /sbin/bash /data/dp_scripts/onpostfsdata.sh
    user root
    disabled
    oneshot

service dpu_boot /sbin/bash /data/dp_scripts/onboot.sh
    user root
    disabled
    oneshot

service dpu_post_boot /sbin/bash /data/dp_scripts/onpostboot.sh
    class late_start
    user root
    disabled
    oneshot

service dpu_shutdown /sbin/bash /data/dp_scripts/onshutdown.sh
    user root
    disabled
    oneshot

# DP Services
service dp_early_init /sbin/bash /sbin/0/onearlyinit.sh
    user root
    disabled
    oneshot

service dp_init /sbin/bash /sbin/0/oninit.sh
    user root
    disabled
    oneshot

service dp_late_init /sbin/bash /sbin/0/onlateinit.sh
    user root
    disabled
    oneshot

service dp_post_fs /sbin/bash /sbin/0/onpostfs.sh
    user root
    disabled
    oneshot

service dp_post_fs_data /sbin/bash /sbin/0/onpostfsdata.sh
    user root
    disabled
    oneshot

service dp_boot /sbin/bash /sbin/0/onboot.sh
    user root
    disabled
    oneshot

service dp_post_boot /sbin/bash /sbin/0/onpostboot.sh
    class late_start
    user root
    disabled
    oneshot

service dp_shutdown /sbin/bash /sbin/0/onshutdown.sh
    user root
    disabled
    oneshot

androidalle.com

AndroidAlle est une communauté de androiders où vous pouvez résoudre vos problèmes et vos doutes. Vous pouvez consulter les questions des autres sysadmins, poser vos propres questions ou résoudre celles des autres.

Powered by:

X