From fba096cc828dccb07be18ed4ae0dae88ab4d91fa Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Thu, 20 Feb 2020 19:09:04 +0100 Subject: [PATCH] fix return statement of function which is 'echo' --- src/xlock | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/xlock b/src/xlock index 82ad26f..db95e80 100644 --- a/src/xlock +++ b/src/xlock @@ -7,13 +7,12 @@ log_b="0"; # returns whether the computer has just booted a few minutes ago -booted(){ - # onboot=`echo "$(cut -d' ' -f1 /proc/uptime) > 1000;" | bc`; - return echo "$(cut -d' ' -f1 /proc/uptime) > 1000;" | bc; +at_boot(){ + echo "$(cut -d' ' -f1 /proc/uptime) > 1000;" | bc; } # lock by default (if not just booted) -if [ "$(booted)" -ne 1 ]; then +if [ "$(at_boot)" -ne 1 ]; then rm "$unlock_f"; fi;