From patchwork Mon Oct 4 18:56:11 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jon Murphy X-Patchwork-Id: 4764 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4HNVLC5C3Pz3xWd for ; Mon, 4 Oct 2021 18:56:19 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail02.haj.ipfire.org", Issuer "R3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4HNVL93sXGz139; Mon, 4 Oct 2021 18:56:17 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4HNVL921MGz2yZk; Mon, 4 Oct 2021 18:56:17 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4HNVL73wGmz2xRb for ; Mon, 4 Oct 2021 18:56:15 +0000 (UTC) Received: from mail-qt1-x834.google.com (mail-qt1-x834.google.com [IPv6:2607:f8b0:4864:20::834]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4HNVL65GCWz139 for ; Mon, 4 Oct 2021 18:56:14 +0000 (UTC) Received: by mail-qt1-x834.google.com with SMTP id c20so16876731qtb.2 for ; Mon, 04 Oct 2021 11:56:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:mime-version:subject:message-id:date:cc:to; bh=9w36HJCNGp3Hb1hqMg9XBEwfg2+zBjs03OgeSPwJrDc=; b=nFXTQX+LQVfFgfHwUQNOxXGdUqxui57zABcjw7IHUjuzcMwXPXgA3zIyuN8A4HbC0s h2btTh8rHkbl7tpxQ8kcU5eSM3t5LNV255Vc8EPfFkeSzECEfc4prHzTV10p2fBYRNQR kRuYnzz2he2HQWWSvCQwzNPdi4dmlXKgjde9TEXl3qwT3+gL47jx399Y3qZyYCh3EgOA 2aWG4NZoQKYmoKeBdOZlgx6PBroRG1PIZxCyrz2fLozR4Ypvl95mxynDt0qJRqTzdj6W 1ffPF452w4aXl1y4TE1MrvJAA2t25fpL0Q6gcq02rhBdC/f3Smjk12xtZ+4o1DKaJAO2 1PNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:mime-version:subject:message-id:date:cc:to; bh=9w36HJCNGp3Hb1hqMg9XBEwfg2+zBjs03OgeSPwJrDc=; b=PKAUCj1Nt6M68MI74GjnGqifShqEFggQGoicSc6oURaCA0sdgkDfKGi6i6PfyXF1A+ VGLSrLPzi4SkAGgm9VStfUcjoG1rJzmI/2mYuYawf3g3kpSj1HaM/gynduHqbOPF67U4 0uQ4xQhTXf7abQKQqZzjKCU4woCgwCxn5hgmgQZcdDxvFStLcpzyEGsAeeh6kFckryfi Q4RVYpZ7A+M3NEk0GS2cCo5nUsMEirZ79dTVCGr6l/yWu/d8yaHpAHrgB8x9Yj0sIeou EZAJibxGy+310bV+fvsvQ7JxamEzx7wgdsMXffEToaNaEKgztOPA2VW0j11xnlfbCVVe FoQA== X-Gm-Message-State: AOAM531DN62nrhrVAlo4xbPgjxP7Tm8FHcH5vtqAQzqNgXou747VazBy jeF/9fT+1GcMZyCDR1qo5hbXyPr+iiA= X-Google-Smtp-Source: ABdhPJz+D6S74rtNwhq/ygTp1+LioAGYZhO/bXx1cqoy7bhR6iQyG99/WEPnPHtaILR5DsvBPtC8bg== X-Received: by 2002:ac8:428c:: with SMTP id o12mr15217847qtl.89.1633373772793; Mon, 04 Oct 2021 11:56:12 -0700 (PDT) Received: from imac3.localdomain ([73.36.250.0]) by smtp.gmail.com with ESMTPSA id bk20sm8719807qkb.13.2021.10.04.11.56.12 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 04 Oct 2021 11:56:12 -0700 (PDT) From: Jon Murphy Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.7\)) Subject: [PATCH 1/2] shutdown.cgi: Add "reboot with filesystem check" button Message-Id: <2453D58E-29AD-46E9-8EA3-B186B31E3C2E@gmail.com> Date: Mon, 4 Oct 2021 13:56:11 -0500 To: "IPFire: Development-List" X-Mailer: Apple Mail (2.3608.120.23.2.7) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=lists.ipfire.org; s=202003rsa; t=1633373774; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: dkim-signature; bh=9w36HJCNGp3Hb1hqMg9XBEwfg2+zBjs03OgeSPwJrDc=; b=C8tkDMk8ZzEl9Tj8/fxU8kGdplCcjBh4n3UNKVrerUFUIruumQ1E3huV3upCdtl2SrzGHk ZrK96RpSOfzvdwe58Wo/Pth9uh5VTnqmQxB0N6uGJmd2Fia2uWqxjT2SYminthmv3gAuC5 1TGPZjgKgc37xIEnn548/TUM3slqz/mDPu+q92W2AHvdrzHjMJMn6OtK54u+IUGR+4L42O TKrCfPROTW6JTRJUSKXexgqofx4JW8vDW/RWIcaHrLlos61yGJDeVseV8Ye2nlU8PVEHYm NBZHuQ4/JBvgUTf9cLhi8t4cJqy4gGKgRJ26IOVMRY/ubi1VQz4UsPT7tJpVbg== ARC-Authentication-Results: i=1; mail01.ipfire.org; dkim=pass header.d=gmail.com header.s=20210112 header.b=nFXTQX+L; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mail01.ipfire.org: domain of jcmurphy26@gmail.com designates 2607:f8b0:4864:20::834 as permitted sender) smtp.mailfrom=jcmurphy26@gmail.com ARC-Seal: i=1; s=202003rsa; d=lists.ipfire.org; t=1633373774; a=rsa-sha256; cv=none; b=nNp4FHVKTi7c3nxuH6TLhT+d+CGgU84SJdi8yqgUN17Ts+0bxd2NzSkeeYTehbnLXZ/LPn 3OLW0xqy1go0qv9uVYZNzoIBQv5Pp11SdX9H9k39lD5FMeZNA1GSmy4K/zM1YwcvjjQzMp X2kr/boxb4hvyq7UWhXnrQXfa26Seb2WfLWShQ5kD6VV4fHOTSAUGpRU3LR9fIflg0Q9GJ WkMdsqRkOAvPY6PP6aLjnp/+XFwGBv7b4h24LzTs8hBJzCIxdKFfBvCk/+tM8c4iBv8MA9 wbBAilEffdVohwgg4+srU4kCOR6Ofcf9CQS92iUkqiK8tG65hgO5eInUKXNj8w== Authentication-Results: mail01.ipfire.org; dkim=pass header.d=gmail.com header.s=20210112 header.b=nFXTQX+L; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mail01.ipfire.org: domain of jcmurphy26@gmail.com designates 2607:f8b0:4864:20::834 as permitted sender) smtp.mailfrom=jcmurphy26@gmail.com X-Rspamd-Queue-Id: 4HNVL65GCWz139 X-Spamd-Result: default: False [-6.40 / 11.00]; BAYES_HAM(-3.00)[99.99%]; IP_REPUTATION_HAM(-1.06)[asn: 15169(-0.29), country: US(-0.01), ip: 2607:f8b0:4864:20::(-0.76)]; NEURAL_HAM(-1.00)[-0.997]; SPF_REPUTATION_HAM(-0.83)[-0.82884387995878]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; MV_CASE(0.50)[]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20210112]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; MX_GOOD(-0.01)[]; PREVIOUSLY_DELIVERED(0.00)[development@lists.ipfire.org]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::834:from]; ARC_NA(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; TO_MATCH_ENVRCPT_SOME(0.00)[]; FROM_HAS_DN(0.00)[]; RECEIVED_SPAMHAUS_PBL(0.00)[73.36.250.0:received]; RCVD_VIA_SMTP_AUTH(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RCVD_COUNT_THREE(0.00)[3]; ARC_SIGNED(0.00)[lists.ipfire.org:s=202003rsa:i=1]; FREEMAIL_FROM(0.00)[gmail.com]; MID_RHS_MATCH_FROM(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; RCPT_COUNT_TWO(0.00)[2]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_ALL(0.00)[] X-Rspamd-Server: mail01.haj.ipfire.org X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.29 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" Leo, I just saw this as part of CU 160 testing. Is it possible/easy to go back to the rounded buttons (like the originals?) I personally think those are a much nicer look. Best regards, Jon (Self-proclaimed "king" of picky items!) ======= [PATCH 1/2] shutdown.cgi: Add "reboot with filesystem check" button Leo-Andres Hofmann hofmann at leo-andres.de  Tue Jul 13 19:06:28 UTC 2021 Previous message (by thread): [PATCH] firewalllog.dat: Proper display protocol names. Next message (by thread): [PATCH 1/2] shutdown.cgi: Add "reboot with filesystem check" button Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] ipfirereboot.c is able to force a file system check during reboot. This patch makes this function available in the shutdown GUI. Signed-off-by: Leo-Andres Hofmann > --- html/cgi-bin/shutdown.cgi | 79 +++++++++++++++++++++++++++++---------- langs/de/cgi-bin/de.pl | 2 + langs/en/cgi-bin/en.pl | 2 + 3 files changed, 63 insertions(+), 20 deletions(-) diff --git a/html/cgi-bin/shutdown.cgi b/html/cgi-bin/shutdown.cgi index e0a2c9da0..1321e158b 100644 --- a/html/cgi-bin/shutdown.cgi +++ b/html/cgi-bin/shutdown.cgi @@ -1,11 +1,23 @@ #!/usr/bin/perl -# -# SmoothWall CGIs -# -# This code is distributed under the terms of the GPL -# -# (c) The SmoothWall Team -# +############################################################################### +# # +# IPFire.org - A linux based firewall # +# Copyright (C) 2021 IPFire Development Team # +# # +# This program is free software: you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation, either version 3 of the License, or # +# (at your option) any later version. # +# # +# This program is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with this program. If not, see >. # +# # +############################################################################### use strict; @@ -17,6 +29,27 @@ require '/var/ipfire/general-functions.pl'; require "${General::swroot}/lang.pl"; require "${General::swroot}/header.pl"; +###--- HTML HEAD ---### +my $extraHead = < + table#controls { + width: 100%; + border: none; + table-layout: fixed; + } + #controls td { + text-align: center; + } + #controls button { + font-weight: bold; + padding: 0.7em; + min-width: 65%; + } + +END +; +###--- END HTML HEAD ---### + my %cgiparams=(); my $death = 0; my $rebirth = 0; @@ -26,33 +59,39 @@ my $rebirth = 0; $cgiparams{'ACTION'} = ''; &Header::getcgihash(\%cgiparams); -if ($cgiparams{'ACTION'} eq $Lang::tr{'shutdown'}) { +if ($cgiparams{'ACTION'} eq "SHUTDOWN") { $death = 1; &General::log($Lang::tr{'shutting down ipfire'}); &General::system('/usr/local/bin/ipfirereboot', 'down'); -} elsif ($cgiparams{'ACTION'} eq $Lang::tr{'reboot'}) { +} elsif ($cgiparams{'ACTION'} eq "REBOOT") { $rebirth = 1; &General::log($Lang::tr{'rebooting ipfire'}); &General::system('/usr/local/bin/ipfirereboot', 'boot'); +} elsif ($cgiparams{'ACTION'} eq "REBOOT_FSCK") { + $rebirth = 1; + &General::log($Lang::tr{'rebooting ipfire fsck'}); + &General::system('/usr/local/bin/ipfirereboot', 'bootfs'); } + if ($death == 0 && $rebirth == 0) { - &Header::openpage($Lang::tr{'shutdown control'}, 1, ''); + &Header::openpage($Lang::tr{'shutdown control'}, 1, $extraHead); &Header::openbigbox('100%', 'left'); + &Header::openbox('100%', 'left'); - print "
\n"; - - &Header::openbox('100%', 'left', ); print < - - - - - + + + + + + + +
+ END - ; +; &Header::closebox(); } else { diff --git a/langs/de/cgi-bin/de.pl b/langs/de/cgi-bin/de.pl index 0d2228ede..76bf0469d 100644 --- a/langs/de/cgi-bin/de.pl +++ b/langs/de/cgi-bin/de.pl @@ -2085,11 +2085,13 @@ 'real address' => 'Reale Addresse', 'reboot' => 'Neustart', 'reboot ask' => 'Neustart?', +'reboot fsck' => 'Neustart & Dateisystem-Test', 'reboot question' => 'Extra Abfrage bei neustart und herunterfahren einschalten', 'reboot schedule' => 'Zeitsteuerung für IPFire Neustarts', 'reboot sure' => 'Sind Sie sicher, dass Sie neustarten wollen?', 'rebooting' => 'Starte neu ...', 'rebooting ipfire' => 'Starte IPFire neu', +'rebooting ipfire fsck' => 'Starte IPFire neu, Dateisystem-Test erzwingen', 'received' => 'Empfangen', 'reconnect' => 'Neu Verbinden', 'reconnection' => 'Wiederverbindung', diff --git a/langs/en/cgi-bin/en.pl b/langs/en/cgi-bin/en.pl index 2ba6961f3..181dc80b0 100644 --- a/langs/en/cgi-bin/en.pl +++ b/langs/en/cgi-bin/en.pl @@ -2120,11 +2120,13 @@ 'real address' => 'Real Address', 'reboot' => 'Reboot', 'reboot ask' => 'Reboot?', +'reboot fsck' => 'Reboot & check filesystem', 'reboot question' => 'Extra query for restart and shutdown', 'reboot schedule' => 'Schedule IPFire reboots', 'reboot sure' => 'Are you sure that you want to reboot?', 'rebooting' => 'Rebooting', 'rebooting ipfire' => 'Rebooting IPFire', +'rebooting ipfire fsck' => 'Rebooting IPFire, forcing filesystem check', 'received' => 'Received', 'reconnect' => 'Reconnect', 'reconnection' => 'Reconnection',