Update global state when starting daemon

This commit is contained in:
xdrm-brackets 2017-07-11 12:39:51 +02:00
parent 05eebd3930
commit ef672e4eef
2 changed files with 18 additions and 11 deletions

View File

@ -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;

View File

@ -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;
}