Message ID | 20200411143848.23912-1-matthias.fischer@ipfire.org |
---|---|
State | Dropped |
Headers |
Return-Path: <development-bounces@lists.ipfire.org> 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) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 48zyF061rWz3yC3 for <patchwork@web04.haj.ipfire.org>; Sat, 11 Apr 2020 14:39:00 +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) client-signature ECDSA (P-384)) (Client CN "mail02.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 48zyDz481Qz1kv; Sat, 11 Apr 2020 14:38:59 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 48zyDz0LfFz2yXw; Sat, 11 Apr 2020 14:38:59 +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) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 48zyDx4FkCz2xcw for <development@lists.ipfire.org>; Sat, 11 Apr 2020 14:38:57 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (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 did not present a certificate) by mail01.ipfire.org (Postfix) with ESMTPSA id 48zyDw5PfDz1kv for <development@lists.ipfire.org>; Sat, 11 Apr 2020 14:38:56 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1586615936; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc; bh=xmgX5p+DWTx98yC1hwOfRb1bARaVzbdzGe97Cyrpttc=; b=o276gpOQrPGVSTKy5A1pLTCG6NHIYsvvKYuMO+4ep15kLHwpMnVj7GrJwRKqTj7BVXeYsC oNF6M43/OUYHTICg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1586615936; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc; bh=xmgX5p+DWTx98yC1hwOfRb1bARaVzbdzGe97Cyrpttc=; b=lX77eAzl61NDhg80SzQMoyW3uS7v04gTPxJB/h7XajAk28IJqqCMUbXIQ8fgAxGE+b+0NQ 77k8p9k15lmcFpWynKDFU7ZlsMJA5ZVAGJfGGeYOVZ3rsWNulZjLpWSftKIVcX5SQrdeNS U+/KKE/gX+HFEeUuT0fGkzlgc+lrt++tRPi+8To54nPIiQwBWLgVr1XbqXf5+mGV6vwe+R VCso2QF7Ugm4pHzxWAwC6t/fAVLldkBYxSeQP0mVfrmLwSN2VkDi5NvBzykF9AvNXRN33M WpV1oeGhZTOwwrkT+8im5ApCoqgYA01Zs65lND+OFyGdAZ+zNbP2OnzB4aO6Jw== From: Matthias Fischer <matthias.fischer@ipfire.org> To: development@lists.ipfire.org Subject: [PATCH] vnstat 2.6: Fix for lfs Date: Sat, 11 Apr 2020 16:38:48 +0200 Message-Id: <20200411143848.23912-1-matthias.fischer@ipfire.org> Authentication-Results: mail01.ipfire.org; auth=pass smtp.mailfrom=matthias.fischer@ipfire.org X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: IPFire development talk <development.lists.ipfire.org> List-Unsubscribe: <https://lists.ipfire.org/mailman/options/development>, <mailto:development-request@lists.ipfire.org?subject=unsubscribe> List-Archive: <http://lists.ipfire.org/pipermail/development/> List-Post: <mailto:development@lists.ipfire.org> List-Help: <mailto:development-request@lists.ipfire.org?subject=help> List-Subscribe: <https://lists.ipfire.org/mailman/listinfo/development>, <mailto:development-request@lists.ipfire.org?subject=subscribe> Errors-To: development-bounces@lists.ipfire.org Sender: "Development" <development-bounces@lists.ipfire.org> |
Series |
vnstat 2.6: Fix for lfs
|
|
Commit Message
Matthias Fischer
April 11, 2020, 2:38 p.m. UTC
Removed 'sleep 2'
Signed-off-by: Matthias Fischer <matthias.fischer@ipfire.org>
---
src/initscripts/system/vnstat | 2 --
1 file changed, 2 deletions(-)
Comments
Hello, Thanks for the patch, but this only solves one of my concerns. What about printing the colourful exit status more than once? Best, -Michael > On 11 Apr 2020, at 15:38, Matthias Fischer <matthias.fischer@ipfire.org> wrote: > > Removed 'sleep 2' > > Signed-off-by: Matthias Fischer <matthias.fischer@ipfire.org> > --- > src/initscripts/system/vnstat | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/src/initscripts/system/vnstat b/src/initscripts/system/vnstat > index bcc19c3ab..a21905d75 100755 > --- a/src/initscripts/system/vnstat > +++ b/src/initscripts/system/vnstat > @@ -20,14 +20,12 @@ case "$1" in > > boot_mesg "Starting vnstatd..." > loadproc /usr/sbin/vnstatd -d --alwaysadd > - sleep 2 > evaluate_retval > ;; > > stop) > boot_mesg "Stopping vnstatd..." > killproc /usr/sbin/vnstatd > - sleep 2 > evaluate_retval > > umount_ramdisk "${VNSTATLOG}" > -- > 2.18.0 >
Hi. On 11.04.2020 17:28, Michael Tremer wrote: > Hello, > > Thanks for the patch, but this only solves one of my concerns. You mean the exit status for the 'stop'-section? > What about printing the colourful exit status more than once? Done... ;-) > Best, > -Michael > >> On 11 Apr 2020, at 15:38, Matthias Fischer <matthias.fischer@ipfire.org> wrote: >> >> Removed 'sleep 2' >> >> Signed-off-by: Matthias Fischer <matthias.fischer@ipfire.org> >> --- >> src/initscripts/system/vnstat | 2 -- >> 1 file changed, 2 deletions(-) >> >> diff --git a/src/initscripts/system/vnstat b/src/initscripts/system/vnstat >> index bcc19c3ab..a21905d75 100755 >> --- a/src/initscripts/system/vnstat >> +++ b/src/initscripts/system/vnstat >> @@ -20,14 +20,12 @@ case "$1" in >> >> boot_mesg "Starting vnstatd..." >> loadproc /usr/sbin/vnstatd -d --alwaysadd >> - sleep 2 >> evaluate_retval >> ;; >> >> stop) >> boot_mesg "Stopping vnstatd..." >> killproc /usr/sbin/vnstatd >> - sleep 2 >> evaluate_retval >> >> umount_ramdisk "${VNSTATLOG}" >> -- >> 2.18.0 >> >
Hi, > On 11 Apr 2020, at 17:39, Matthias Fischer <matthias.fischer@ipfire.org> wrote: > > Hi. > > On 11.04.2020 17:28, Michael Tremer wrote: >> Hello, >> >> Thanks for the patch, but this only solves one of my concerns. > > You mean the exit status for the 'stop'-section? No, everywhere. > >> What about printing the colourful exit status more than once? > > Done... ;-) > >> Best, >> -Michael >> >>> On 11 Apr 2020, at 15:38, Matthias Fischer <matthias.fischer@ipfire.org> wrote: >>> >>> Removed 'sleep 2' >>> >>> Signed-off-by: Matthias Fischer <matthias.fischer@ipfire.org> >>> --- >>> src/initscripts/system/vnstat | 2 -- >>> 1 file changed, 2 deletions(-) >>> >>> diff --git a/src/initscripts/system/vnstat b/src/initscripts/system/vnstat >>> index bcc19c3ab..a21905d75 100755 >>> --- a/src/initscripts/system/vnstat >>> +++ b/src/initscripts/system/vnstat >>> @@ -20,14 +20,12 @@ case "$1" in >>> >>> boot_mesg "Starting vnstatd..." >>> loadproc /usr/sbin/vnstatd -d --alwaysadd >>> - sleep 2 >>> evaluate_retval >>> ;; >>> >>> stop) >>> boot_mesg "Stopping vnstatd..." >>> killproc /usr/sbin/vnstatd >>> - sleep 2 >>> evaluate_retval >>> >>> umount_ramdisk "${VNSTATLOG}" >>> -- >>> 2.18.0 >>> >> >
Hi, On 11.04.2020 20:03, Michael Tremer wrote: > Hi, > >> On 11 Apr 2020, at 17:39, Matthias Fischer <matthias.fischer@ipfire.org> wrote: >> >> Hi. >> >> On 11.04.2020 17:28, Michael Tremer wrote: >>> Hello, >>> >>> Thanks for the patch, but this only solves one of my concerns. >> >> You mean the exit status for the 'stop'-section? > > No, everywhere. -v please. 'evaluate_retval' is now four times in, status output has been added. Anything else? > >> >>> What about printing the colourful exit status more than once? >> >> Done... ;-) >> >>> Best, >>> -Michael >>> >>>> On 11 Apr 2020, at 15:38, Matthias Fischer <matthias.fischer@ipfire.org> wrote: >>>> >>>> Removed 'sleep 2' >>>> >>>> Signed-off-by: Matthias Fischer <matthias.fischer@ipfire.org> >>>> --- >>>> src/initscripts/system/vnstat | 2 -- >>>> 1 file changed, 2 deletions(-) >>>> >>>> diff --git a/src/initscripts/system/vnstat b/src/initscripts/system/vnstat >>>> index bcc19c3ab..a21905d75 100755 >>>> --- a/src/initscripts/system/vnstat >>>> +++ b/src/initscripts/system/vnstat >>>> @@ -20,14 +20,12 @@ case "$1" in >>>> >>>> boot_mesg "Starting vnstatd..." >>>> loadproc /usr/sbin/vnstatd -d --alwaysadd >>>> - sleep 2 >>>> evaluate_retval >>>> ;; >>>> >>>> stop) >>>> boot_mesg "Stopping vnstatd..." >>>> killproc /usr/sbin/vnstatd >>>> - sleep 2 >>>> evaluate_retval >>>> >>>> umount_ramdisk "${VNSTATLOG}" >>>> -- >>>> 2.18.0 >>>> >>> >> >
> On 11 Apr 2020, at 19:17, Matthias Fischer <matthias.fischer@ipfire.org> wrote: > > Hi, > > On 11.04.2020 20:03, Michael Tremer wrote: >> Hi, >> >>> On 11 Apr 2020, at 17:39, Matthias Fischer <matthias.fischer@ipfire.org> wrote: >>> >>> Hi. >>> >>> On 11.04.2020 17:28, Michael Tremer wrote: >>>> Hello, >>>> >>>> Thanks for the patch, but this only solves one of my concerns. >>> >>> You mean the exit status for the 'stop'-section? >> >> No, everywhere. > > -v please. LOL. Good one :) So, you are launching vnstatd by calling loadproc. That function will start the process and print “OK” or “ERROR” in a colour on the console. Calling evaluate_retval (which should be called in loadproc, too) will then print OK again. Did it not do that when you tested it? -Michael > > 'evaluate_retval' is now four times in, status output has been added. > > Anything else? > >> >>> >>>> What about printing the colourful exit status more than once? >>> >>> Done... ;-) >>> >>>> Best, >>>> -Michael >>>> >>>>> On 11 Apr 2020, at 15:38, Matthias Fischer <matthias.fischer@ipfire.org> wrote: >>>>> >>>>> Removed 'sleep 2' >>>>> >>>>> Signed-off-by: Matthias Fischer <matthias.fischer@ipfire.org> >>>>> --- >>>>> src/initscripts/system/vnstat | 2 -- >>>>> 1 file changed, 2 deletions(-) >>>>> >>>>> diff --git a/src/initscripts/system/vnstat b/src/initscripts/system/vnstat >>>>> index bcc19c3ab..a21905d75 100755 >>>>> --- a/src/initscripts/system/vnstat >>>>> +++ b/src/initscripts/system/vnstat >>>>> @@ -20,14 +20,12 @@ case "$1" in >>>>> >>>>> boot_mesg "Starting vnstatd..." >>>>> loadproc /usr/sbin/vnstatd -d --alwaysadd >>>>> - sleep 2 >>>>> evaluate_retval >>>>> ;; >>>>> >>>>> stop) >>>>> boot_mesg "Stopping vnstatd..." >>>>> killproc /usr/sbin/vnstatd >>>>> - sleep 2 >>>>> evaluate_retval >>>>> >>>>> umount_ramdisk "${VNSTATLOG}" >>>>> -- >>>>> 2.18.0 >>>>> >>>> >>> >> >
Hi, On 11.04.2020 20:03, Michael Tremer wrote: > Hi, > >> On 11 Apr 2020, at 17:39, Matthias Fischer <matthias.fischer@ipfire.org> wrote: >> >> Hi. >> >> On 11.04.2020 17:28, Michael Tremer wrote: >>> Hello, >>> >>> Thanks for the patch, but this only solves one of my concerns. >> >> You mean the exit status for the 'stop'-section? > > No, everywhere. > >> ... Current version contains 'evaluate_retval' in all start/stop actions plus output for 'status': => https://git.ipfire.org/?p=people/mfischer/ipfire-2.x.git;a=blob;f=src/initscripts/system/vnstat;h=c1bb2942a897e0a4acab344c8e2c128d4542f958;hb=59b3afd07f55b93f4c96bfe63d0506494a46b5ff Please check if this is ok now. Best, Matthias
Hi, Yes, but this script does not contain any evaluate_retval calls after loadproc/killproc: https://git.ipfire.org/?p=people/mfischer/ipfire-2.x.git;a=blob;f=src/initscripts/system/lvmetad;h=fdae39fd9c74e3950495ee54a1f6762af951fab4;hb=59b3afd07f55b93f4c96bfe63d0506494a46b5ff -Michael > On 11 Apr 2020, at 19:22, Matthias Fischer <matthias.fischer@ipfire.org> wrote: > > Hi, > > On 11.04.2020 20:03, Michael Tremer wrote: >> Hi, >> >>> On 11 Apr 2020, at 17:39, Matthias Fischer <matthias.fischer@ipfire.org> wrote: >>> >>> Hi. >>> >>> On 11.04.2020 17:28, Michael Tremer wrote: >>>> Hello, >>>> >>>> Thanks for the patch, but this only solves one of my concerns. >>> >>> You mean the exit status for the 'stop'-section? >> >> No, everywhere. >> >>> ... > > Current version contains 'evaluate_retval' in all start/stop actions > plus output for 'status': > > => > https://git.ipfire.org/?p=people/mfischer/ipfire-2.x.git;a=blob;f=src/initscripts/system/vnstat;h=c1bb2942a897e0a4acab344c8e2c128d4542f958;hb=59b3afd07f55b93f4c96bfe63d0506494a46b5ff > > Please check if this is ok now. > > Best, > Matthias >
Hi, On 11.04.2020 20:21, Michael Tremer wrote: > > >> On 11 Apr 2020, at 19:17, Matthias Fischer <matthias.fischer@ipfire.org> wrote: >> >> Hi, >> >> On 11.04.2020 20:03, Michael Tremer wrote: >>> Hi, >>> >>>> On 11 Apr 2020, at 17:39, Matthias Fischer <matthias.fischer@ipfire.org> wrote: >>>> >>>> Hi. >>>> >>>> On 11.04.2020 17:28, Michael Tremer wrote: >>>>> Hello, >>>>> >>>>> Thanks for the patch, but this only solves one of my concerns. >>>> >>>> You mean the exit status for the 'stop'-section? >>> >>> No, everywhere. >> >> -v please. > > LOL. Good one :) :-) > So, you are launching vnstatd by calling loadproc. Yep. > That function will start the process and print “OK” or “ERROR” in a colour on the console. I noticed that, but... > Calling evaluate_retval (which should be called in loadproc, too) will then print OK again. I saw that, too, but didn't think of ALL actions in that script. > Did it not do that when you tested it? Nope. Doing it that way was a bit unfamiliar but I'll get used to it. I had to take a look at the other inits and 'functions.pl'. Now I finally know where the colorful "OKs" come from...you're never too old... ;-)) Does that last version fit your needs? Current link is: https://git.ipfire.org/?p=people/mfischer/ipfire-2.x.git;a=blob;f=src/initscripts/system/vnstat;h=c1bb2942a897e0a4acab344c8e2c128d4542f958;hb=59b3afd07f55b93f4c96bfe63d0506494a46b5ff Best, Matthias > -Michael > >> >> 'evaluate_retval' is now four times in, status output has been added. >> >> Anything else? >> >>> >>>> >>>>> What about printing the colourful exit status more than once? >>>> >>>> Done... ;-) >>>> >>>>> Best, >>>>> -Michael >>>>> >>>>>> On 11 Apr 2020, at 15:38, Matthias Fischer <matthias.fischer@ipfire.org> wrote: >>>>>> >>>>>> Removed 'sleep 2' >>>>>> >>>>>> Signed-off-by: Matthias Fischer <matthias.fischer@ipfire.org> >>>>>> --- >>>>>> src/initscripts/system/vnstat | 2 -- >>>>>> 1 file changed, 2 deletions(-) >>>>>> >>>>>> diff --git a/src/initscripts/system/vnstat b/src/initscripts/system/vnstat >>>>>> index bcc19c3ab..a21905d75 100755 >>>>>> --- a/src/initscripts/system/vnstat >>>>>> +++ b/src/initscripts/system/vnstat >>>>>> @@ -20,14 +20,12 @@ case "$1" in >>>>>> >>>>>> boot_mesg "Starting vnstatd..." >>>>>> loadproc /usr/sbin/vnstatd -d --alwaysadd >>>>>> - sleep 2 >>>>>> evaluate_retval >>>>>> ;; >>>>>> >>>>>> stop) >>>>>> boot_mesg "Stopping vnstatd..." >>>>>> killproc /usr/sbin/vnstatd >>>>>> - sleep 2 >>>>>> evaluate_retval >>>>>> >>>>>> umount_ramdisk "${VNSTATLOG}" >>>>>> -- >>>>>> 2.18.0 >>>>>> >>>>> >>>> >>> >> >
On 11.04.2020 20:26, Michael Tremer wrote: > Hi, > > Yes, but this script does not contain any evaluate_retval calls after loadproc/killproc: > > https://git.ipfire.org/?p=people/mfischer/ipfire-2.x.git;a=blob;f=src/initscripts/system/lvmetad;h=fdae39fd9c74e3950495ee54a1f6762af951fab4;hb=59b3afd07f55b93f4c96bfe63d0506494a46b5ff > > ... Current link is (I updated the one above!): https://git.ipfire.org/?p=people/mfischer/ipfire-2.x.git;a=blob;f=src/initscripts/system/vnstat;h=c1bb2942a897e0a4acab344c8e2c128d4542f958;hb=59b3afd07f55b93f4c96bfe63d0506494a46b5ff Best, Matthias
Hi, > On 11 Apr 2020, at 19:41, Matthias Fischer <matthias.fischer@ipfire.org> wrote: > > On 11.04.2020 20:26, Michael Tremer wrote: >> Hi, >> >> Yes, but this script does not contain any evaluate_retval calls after loadproc/killproc: >> >> https://git.ipfire.org/?p=people/mfischer/ipfire-2.x.git;a=blob;f=src/initscripts/system/lvmetad;h=fdae39fd9c74e3950495ee54a1f6762af951fab4;hb=59b3afd07f55b93f4c96bfe63d0506494a46b5ff >> >> ... > > Current link is (I updated the one above!): > https://git.ipfire.org/?p=people/mfischer/ipfire-2.x.git;a=blob;f=src/initscripts/system/vnstat;h=c1bb2942a897e0a4acab344c8e2c128d4542f958;hb=59b3afd07f55b93f4c96bfe63d0506494a46b5ff So in this script, when you remove line 23 and 33, you will still see OK. That is being printed in loadproc. evaluate_retval will now always overwrite what loadproc has printed to the right hand side of the console. We want to see any errors here :) -Michael > > Best, > Matthias
Hi, On 12.04.2020 16:15, Michael Tremer wrote: >> ... >> Current link is (I updated the one above!): >> https://git.ipfire.org/?p=people/mfischer/ipfire-2.x.git;a=blob;f=src/initscripts/system/vnstat;h=c1bb2942a897e0a4acab344c8e2c128d4542f958;hb=59b3afd07f55b93f4c96bfe63d0506494a46b5ff > > So in this script, when you remove line 23 and 33, you will still see OK. To make this clear to me: First: Line 23 contains 'evaluate_retval' after 'loadproc...vnstat'. This is counterproductive, because...: > That is being printed in loadproc. evaluate_retval will now always overwrite what loadproc has printed to the right hand side of the console. Ok, understood. I'll delete line 23. Second: 'evaluate_retval' in line 33 (umount_ramdisk ...) is similar with line 23. Here the output of evaluate_retval' would overwrite error messages regarding the unmounting of the ramdisk.(?) But: in this case I can't see where the [OK] should come from (see above: "...you will still see OK") when I remove line 33, because I'll see only the output of 'boot_msg'!? Would be ok for me, I'll delete line 33, too - I'm just wondering. > We want to see any errors here Me, too. ;-) Best, Matthias
diff --git a/src/initscripts/system/vnstat b/src/initscripts/system/vnstat index bcc19c3ab..a21905d75 100755 --- a/src/initscripts/system/vnstat +++ b/src/initscripts/system/vnstat @@ -20,14 +20,12 @@ case "$1" in boot_mesg "Starting vnstatd..." loadproc /usr/sbin/vnstatd -d --alwaysadd - sleep 2 evaluate_retval ;; stop) boot_mesg "Stopping vnstatd..." killproc /usr/sbin/vnstatd - sleep 2 evaluate_retval umount_ramdisk "${VNSTATLOG}"