From: GetAway Date: Sat, 10 Dec 2016 20:56:21 +0000 (+0100) Subject: use new pzapit to lock & unlock RC X-Git-Url: https://git.webhop.me/?a=commitdiff_plain;h=0ca8ac74a6abd44923a0b607231f951d47e780eb;p=shellexec.git use new pzapit to lock & unlock RC --- diff --git a/shellexec.c b/shellexec.c index 6152cb4..20e9107 100644 --- a/shellexec.c +++ b/shellexec.c @@ -8,7 +8,7 @@ #include "io.h" #include "gfx.h" -#define SH_VERSION 1.36 +#define SH_VERSION 1.37 static char CFG_FILE[128]="/var/tuxbox/config/shellexec.conf"; @@ -85,6 +85,7 @@ int paging=1, mtmo=120, radius=11; int ixw=600, iyw=680, xoffs=13, vfd=0; char INST_FILE[]="/tmp/rc.locked"; int instance=0; +int rclocked=0; int stride; int get_instance(void) @@ -106,6 +107,10 @@ void put_instance(int pval) if(pval) { + if (!rclocked) { + rclocked=1; + system("pzapit -lockrc > /dev/null"); + } if((fh=fopen(INST_FILE,"w"))!=NULL) { fputc(pval,fh); @@ -115,6 +120,7 @@ void put_instance(int pval) else { remove(INST_FILE); + system("pzapit -unlockrc > /dev/null"); } }