added SXMO_LOCK_SCREEN_OFF and SXMO_LOCK_SUSPEND environment variables to set a target stage from the environment
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
This commit is contained in:
parent
642bf1cc27
commit
1b45e7743d
1 changed files with 6 additions and 0 deletions
|
@ -449,6 +449,12 @@ main(int argc, char **argv) {
|
|||
const char* rtcwakeinterval = getenv("SXMO_RTCWAKEINTERVAL");
|
||||
if (rtcwakeinterval != NULL) wakeinterval = atoi(rtcwakeinterval);
|
||||
|
||||
const char* screen_off = getenv("SXMO_LOCK_SCREEN_OFF");
|
||||
if (screen_off != NULL && atoi(screen_off)) target = StateNoInputNoScreen;
|
||||
|
||||
const char* suspend = getenv("SXMO_LOCK_SUSPEND");
|
||||
if (suspend != NULL && atoi(suspend)) target = StateSuspend;
|
||||
|
||||
//parse command line arguments
|
||||
for (i = 1; i < argc; i++) {
|
||||
if(!strcmp(argv[i], "-h")) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue