From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matthias Fischer To: development@lists.ipfire.org Subject: Re: [PATCH] vnstat 2.6: Fix for lfs Date: Sat, 11 Apr 2020 20:40:16 +0200 Message-ID: In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1077486546042459747==" List-Id: --===============1077486546042459747== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hi, On 11.04.2020 20:21, Michael Tremer wrote: >=20 >=20 >> On 11 Apr 2020, at 19:17, Matthias Fischer = wrote: >>=20 >> Hi, >>=20 >> On 11.04.2020 20:03, Michael Tremer wrote: >>> Hi, >>>=20 >>>> On 11 Apr 2020, at 17:39, Matthias Fischer wrote: >>>>=20 >>>> Hi. >>>>=20 >>>> On 11.04.2020 17:28, Michael Tremer wrote: >>>>> Hello, >>>>>=20 >>>>> Thanks for the patch, but this only solves one of my concerns. >>>>=20 >>>> You mean the exit status for the 'stop'-section? >>>=20 >>> No, everywhere. >>=20 >> -v please. >=20 > LOL. Good one :) :-) > So, you are launching vnstatd by calling loadproc. Yep. > That function will start the process and print =E2=80=9COK=E2=80=9D or =E2= =80=9CERROR=E2=80=9D 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=3Dpeople/mfischer/ipfire-2.x.git;a=3Dblob;f=3Dsrc/i= nitscripts/system/vnstat;h=3Dc1bb2942a897e0a4acab344c8e2c128d4542f958;hb=3D59= b3afd07f55b93f4c96bfe63d0506494a46b5ff Best, Matthias > -Michael >=20 >>=20 >> 'evaluate_retval' is now four times in, status output has been added. >>=20 >> Anything else? >>=20 >>>=20 >>>>=20 >>>>> What about printing the colourful exit status more than once? >>>>=20 >>>> Done... ;-) >>>>=20 >>>>> Best, >>>>> -Michael >>>>>=20 >>>>>> On 11 Apr 2020, at 15:38, Matthias Fischer wrote: >>>>>>=20 >>>>>> Removed 'sleep 2' >>>>>>=20 >>>>>> Signed-off-by: Matthias Fischer >>>>>> --- >>>>>> src/initscripts/system/vnstat | 2 -- >>>>>> 1 file changed, 2 deletions(-) >>>>>>=20 >>>>>> diff --git a/src/initscripts/system/vnstat b/src/initscripts/system/vn= stat >>>>>> index bcc19c3ab..a21905d75 100755 >>>>>> --- a/src/initscripts/system/vnstat >>>>>> +++ b/src/initscripts/system/vnstat >>>>>> @@ -20,14 +20,12 @@ case "$1" in >>>>>>=20 >>>>>> boot_mesg "Starting vnstatd..." >>>>>> loadproc /usr/sbin/vnstatd -d --alwaysadd >>>>>> - sleep 2 >>>>>> evaluate_retval >>>>>> ;; >>>>>>=20 >>>>>> stop) >>>>>> boot_mesg "Stopping vnstatd..." >>>>>> killproc /usr/sbin/vnstatd >>>>>> - sleep 2 >>>>>> evaluate_retval >>>>>>=20 >>>>>> umount_ramdisk "${VNSTATLOG}" >>>>>> --=20 >>>>>> 2.18.0 >>>>>>=20 >>>>>=20 >>>>=20 >>>=20 >>=20 >=20 --===============1077486546042459747==--