From patchwork Wed Jun 5 05:49:22 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephan Feddersen X-Patchwork-Id: 2279 Return-Path: Received: from mail01.ipfire.org (mail01.i.ipfire.org [172.28.1.200]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail01.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by web07.i.ipfire.org (Postfix) with ESMTPS id DF66F88892E for ; Tue, 4 Jun 2019 20:49:32 +0100 (BST) Received: from mail01.i.ipfire.org (localhost [IPv6:::1]) by mail01.ipfire.org (Postfix) with ESMTP id 45JMvH6nVnz5LH2d; Tue, 4 Jun 2019 20:49:31 +0100 (BST) Received: from ubuntu.stflan.home (p5784F654.dip0.t-ipconnect.de [87.132.246.84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mail01.ipfire.org (Postfix) with ESMTPSA id 45JMvF0Jn4z5LH2c; Tue, 4 Jun 2019 20:49:28 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=201904rsa; t=1559677769; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc; bh=TJu+DSCiah4NLJCkW+lOOgIjReOwVhS4QVcmPIWI43w=; b=SL/RL0cuvAHLGo4t1Eh9njKqQhQwRiNUKA1/9vGCHNiZ0WtEg/ZwX0B9FyACEcmu8QJJr4 iR3rqnnw8XbxkkMjYQm4D5ercbcsiPV5iLG449xBAdg5/937MJ69wD4l1N9ZZ2aoPpI2K4 YjF/kXzCsIjtZrC1kEi27gEYJnxD7bOFccfM6chVXPSL2GgU4WHN+vOXjB2K3d+RjUNvws FUNEfrCta3UMlYfvV0EjNLiuVcHPBKM6DgW+mx+vgpni5qIJB1emB/nUyPUPkqPjPTokjp 6gdMlQH1rhEzTzi68oWZAFBLR16guacPuJasiZ+riC3eQwlBBZbBd9GlyZUfWA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=201904ed25519; t=1559677769; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc; bh=TJu+DSCiah4NLJCkW+lOOgIjReOwVhS4QVcmPIWI43w=; b=SAWUXQN91E5eEtd/tzId7uZ4ke4+Gr9OGoWCnawNPLDg17DaemkxLAgT7NX1hAd9sntMTc AWdhAVdSHE05p4DA== From: sfeddersen To: development@lists.ipfire.org Subject: [PATCH] BUG 11487:solve problem with unexspected shutdown Date: Tue, 4 Jun 2019 21:49:22 +0200 Message-Id: <20190604194922.6042-1-sfeddersen@ipfire.org> X-Mailer: git-send-email 2.17.1 Authentication-Results: mail01.ipfire.org; auth=pass smtp.auth=sfeddersen smtp.mailfrom=sfeddersen@ipfire.org Cc: sfeddersen X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: IPFire development talk List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: development-bounces@lists.ipfire.org Sender: "Development" Solve problem with unexspected shutdown problem when checking a single client. --- lfs/wio | 2 +- src/wio/main/wio.pl | 11 +++++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/lfs/wio b/lfs/wio index 7098dd9cf..92186efad 100644 --- a/lfs/wio +++ b/lfs/wio @@ -15,7 +15,7 @@ THISAPP = wio-$(VER) DIR_APP = $(DIR_SRC)/$(THISAPP) TARGET = $(DIR_INFO)/$(THISAPP) PROG = wio -PAK_VER = 3 +PAK_VER = 4 ############################################################################### # Top-level Rules diff --git a/src/wio/main/wio.pl b/src/wio/main/wio.pl index b846feafa..8e2fb8879 100644 --- a/src/wio/main/wio.pl +++ b/src/wio/main/wio.pl @@ -21,7 +21,7 @@ # # ############################################################################### # -# Version: 2017/08/04 18:55:23 +# Version: 2019/06/04 21:12:23 # # This wio.pl is based on the Code from the IPCop WIO Addon # and is extremly adapted to work with IPFire. @@ -86,9 +86,9 @@ my $redip = $hostname; my $vpnpid = ( -e "/var/run/charon.pid" ? `awk '{print $1}' /var/run/charon.pid`: ''); my $ovpnpid = ( -e "/var/run/openvpn.pid" ? `awk '{print $1}' /var/run/openvpn.pid`: ''); -my $steptime = $wiosettings{'CRON'} *= 60; -my $i_ping = 'icmp'; -my $t_ping = 'tcp'; +my $steptime = $wiosettings{'CRON'} *= 60; +my $i_ping = 'icmp'; +my $t_ping = 'tcp'; my $nr = 1; my $poweroff = 0; @@ -101,7 +101,6 @@ my ( $ping_i, $ping_t, $ping_ib, $ping_tb, $ping_iv, $ping_tv, $pingmode ) = ''; my ( @tmp, @arptmp, @myarray, @status, @arpclients ) = ''; my @ifaces = ('GREEN','BLUE','ORANGE'); - if ( $mailsettings{'USEMAIL'} eq 'on' ) { $mailen = 'on'; } else { $mailen = 'off'; } @@ -299,7 +298,7 @@ if ($debug) { if ( $smailtxt ne '' ) { &WIO::mailsender($Lang::tr{'wio_sub'}, $smailtxt); } -if ($shutdown eq 'on') { +if ($shutdown eq 'on' && ! -e $onoffip) { foreach (@status) { chomp; @tmp = split( /\,/, $_ );