Update global state when starting daemon
This commit is contained in:
parent
05eebd3930
commit
ef672e4eef
|
@ -36,7 +36,7 @@
|
|||
/* (1) Fetch from file */
|
||||
$f_cstates = new SplFileObject(STATES_CONF, 'r');
|
||||
|
||||
/* (2) Section Title */
|
||||
/* (2) If fetch error */
|
||||
if( $f_cstates === false ){
|
||||
slog('Cannot access GLOBAL/CHIP STATES file', 'global-state:update', 'daemon');
|
||||
return 127;
|
||||
|
|
|
@ -308,6 +308,13 @@
|
|||
return 127;
|
||||
|
||||
|
||||
/* [4] Update global state
|
||||
=========================================================*/
|
||||
/* (1) Do it once to unlock gpio boot lag */
|
||||
syscall(SOURCE_DIR.'/lib/global-state/update');
|
||||
|
||||
/* (2) Do it again to apply global state */
|
||||
syscall(SOURCE_DIR.'/lib/global-state/update');
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue