commit 65045cb50a split the timeout config
option into two values, this is a kconf_update script for updating it
wilder-5.14
parent
c4c7e6d53f
commit
8de8af873e
3 changed files with 48 additions and 0 deletions
@ -0,0 +1,5 @@ |
|||||||
|
Version=5 |
||||||
|
Id=0.1-autolock |
||||||
|
File=kscreenlockerrc |
||||||
|
Group=Daemon |
||||||
|
Script=ksreenlocker_5_3_separate_autologin.pl,perl |
||||||
@ -0,0 +1,37 @@ |
|||||||
|
#! /usr/bin/perl |
||||||
|
|
||||||
|
|
||||||
|
use strict; |
||||||
|
|
||||||
|
my $key; |
||||||
|
my $value; |
||||||
|
|
||||||
|
my $alreadyHasAutolockKey = 0; |
||||||
|
|
||||||
|
while (<>) |
||||||
|
{ |
||||||
|
chomp; |
||||||
|
if ( /^\[/ ) |
||||||
|
{ |
||||||
|
next; |
||||||
|
} |
||||||
|
($key, $value) = ($_ =~ /([^=]+)=[ \t]*([^\n]+)/); |
||||||
|
|
||||||
|
if ($key eq "Autolock") |
||||||
|
{ |
||||||
|
$alreadyHasAutolockKey = 1; |
||||||
|
} |
||||||
|
|
||||||
|
if ($key eq "Timeout" && $alreadyHasAutolockKey == 0) |
||||||
|
{ |
||||||
|
if ($value eq "0") |
||||||
|
{ |
||||||
|
print("Autolock=false\n"); |
||||||
|
} |
||||||
|
else |
||||||
|
{ |
||||||
|
print("Autolock=true\n"); |
||||||
|
} |
||||||
|
} |
||||||
|
print "$_\n" |
||||||
|
} |
||||||
Loading…
Reference in new issue