Skip to content

Boot scripts

Damien Gaignon edited this page Apr 24, 2019 · 1 revision

Description

There is 2 methods to launch commands at boot :

  • Events manager
  • boot script

Events manager

Create a file called events_boot.py in a folder named events

class init():
    # obj is the parent object with all methods and attributes
    def __init__(self, obj):
    args= {}

    args['API command 1']= argument
    args['API command 2']= None

    obj.execute(args, _sCB= True)

Where :

  • API command is the command in the commands list
  • argument is a argument of the commands or None if no argument needed

As the script is a python script, all kind of things could be done before returning args dictionnary.
This script is launched by the events manager thus all things applied by it are to be taken into account.

Boot script

Create a file called bootcmd.sh in the SDCard.
This is a bash script so refer to SS64 for example to create the file.
All commands available are from Busybox plus specific commands to Yi4k :