Re: [weewx-user] #!/bin/sh does not equal #!/bin/bash

2023-09-12 Thread 'Cameron D' via weewx-user
>>>  More than anyone wanted to know!  ??
Well, no - it is just what I wanted to know, only it's a bit too late.
The recent Debian 12 upgrade broke an embarrassingly large fraction of my 
cron scripts. Even though the scripts were #!/bin/sh, the bashisms were 
still working, so I had assumed they were posix-compatible.

Those links look like something I should investigate, thank you.
Cameron.

On Tuesday, 12 September 2023 at 12:33:33 pm UTC+10 Nate Bargmann wrote:

> * On 2023 11 Sep 20:50 -0500, gary@gmail.com wrote:
> > How's this related to WeeWX? I use a systemd timer to backup the 
> database. 
> > That one works a treat as I used bash, not sh
>
> It really depends on the distribution. Some use Bash as the login and
> system shell by symlinking it to /bin/sh. When called as 'sh' Bash
> mostly restricts itself to POSIX defined sh behavior. So-called
> Bashisms (Bash extensions to sh grammar) are turned off and scripts
> written to take advantage of Bashisms will have errors.
>
> Several releases ago Debian went one step further and set dash (Debian
> Almquist Shell) as the default system shell as noted:
>
> https://wiki.debian.org/Shell
>
> Converting a script with Bashisms to dash (sh) can be trivial or not.
> To aid in that process Debian offers checkbashisms:
>
> https://manpages.debian.org/bookworm/devscripts/checkbashisms.1.en.html
>
> Debian's choices filter down to Raspberry Pi OS and other derivatives
> such as Armbian and Ubuntu flavors..
>
> It is up to the script author/maintainer/distribution which shell to
> support. Some distributions have their system shell scripts written
> with the #!/bin/bash shebang. It is worth noting that beginning with
> Debian 12 (Bookworm) Bash can no longer be set as the system shell
> by running 'dpkg-reconfigure dash'. Of course manually editing the
> symlink can be done but there may be unexpected results with system
> scripts now written for Dash.
>
> More than anyone wanted to know!
>
> - Nate
>
> -- 
> "The optimist proclaims that we live in the best of all
> possible worlds. The pessimist fears this is true."
> Web: https://www.n0nb.us
> Projects: https://github.com/N0NB
> GPG fingerprint: 82D6 4F6B 0E67 CD41 F689 BBA6 FB2C 5130 D55A 8819
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/ebec42ce-240e-4c4d-a27d-95ddca6f7b2en%40googlegroups.com.


Re: [weewx-user] #!/bin/sh does not equal #!/bin/bash

2023-09-12 Thread Greg Troxel
Nate Bargmann  writes:

Thanks for your super complete and informative note.

> It is up to the script author/maintainer/distribution which shell to
> support.  Some distributions have their system shell scripts written
> with the #!/bin/bash shebang.  It is worth noting that beginning with
> Debian 12 (Bookworm) Bash can no longer be set as the system shell
> by running 'dpkg-reconfigure dash'.

It is up to the author, but I believe it is a bug to rely on non-POSIX
behavior at all.   It is certainly a bug to do so without a Big Scary
Warning just after the #! that states that the script is non-portable
and which features to use.

Its' great of Debian to be helping to root out these bugs.

(FWIW, I'm not in general a bash hater -- I use it as my login shell --
but I do vigorously object to non-portable scripts.   I use NetBSD which
has a almost-or-entirely POSIX-compliant sh without most bash
extensions.)

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/rmittrzfex0.fsf%40s1.lexort.com.


RE: [weewx-user] Re: weewx with rtl-davis - Installation Assistance?

2023-09-12 Thread John Argue
The problem is definitely the battery.  I didn’t have it installed because I 
was testing and they’re not cheap.  But – no battery – but supercap charged and 
valid messages being received - fails every time.  Put battery in and suddenly 
you get the packet being decoded (which it wasn’t before – you just got the 
data packet and no decoding)  bat_iss : 0  - wondering if this is issue in 
driver?

 

John

 

From: weewx-user@googlegroups.com  On Behalf Of 
Lorin Tremblay
Sent: September 7, 2023 11:58 PM
To: weewx-user 
Subject: Re: [weewx-user] Re: weewx with rtl-davis - Installation Assistance?

 

Don’t remember, but tried without it, still does the same thing and it always 
restart in the morning……

On Thursday, September 7, 2023 at 11:22:57 PM UTC-4 vince wrote:

Why are you setting -ex 200 ?

The defaults worked fine for me for multiple days with a VP2 (one ISS), FWIW.

 

On Thursday, September 7, 2023 at 8:16:53 PM UTC-7 Lorin Tremblay wrote:


It happens every night for me…

On Tuesday, September 5, 2023 at 7:48:45 AM UTC-4 Lorin Tremblay wrote:

Having the same issue about once a day for 4-6 hours

 

Sep  5 07:34:18 WeeWx-APRS270 weewx[610] INFO weewx.engine: Main loop exiting. 
Shutting engine down.
Sep  5 07:34:18 WeeWx-APRS270 weewx[610] INFO user.rtldavis: shutdown process 
/home/pi/bin/rtldavis -ex 200 -tf US -tr 1
Sep  5 07:34:18 WeeWx-APRS270 weewx[610] INFO user.rtldavis: rtldavis with pid 
1847 killed
Sep  5 07:34:18 WeeWx-APRS270 weewx[610] CRITICAL __main__: Caught 
WeeWxIOError: rtldavis process stalled
Sep  5 07:34:18 WeeWx-APRS270 weewx[610] CRITICAL __main__:   Waiting 
60 seconds then retrying...

-- 
You received this message because you are subscribed to a topic in the Google 
Groups "weewx-user" group.
To unsubscribe from this topic, visit 
https://groups.google.com/d/topic/weewx-user/bGiQPuOljqs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to 
weewx-user+unsubscr...@googlegroups.com 
 .
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/f1deaaff-562d-4a6b-bf8a-10afc8dd5ed7n%40googlegroups.com
 

 .

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/00e301d9e5db%2436254130%24a26fc390%24%40xplornet.ca.


Re: [weewx-user] weewx with rtl-davis - Installation Assistance?

2023-09-12 Thread weather list
I had to replace the Supercap, which had leaked. Also had to re-solder the 
contacts of the battery bracket to the PC board. Problem solved.

> On 12 Sep, 2023, at 20:42, John Argue  > wrote:
> 
> The problem is definitely the battery.  I didn’t have it installed because I 
> was testing and they’re not cheap.  But – no battery – but supercap charged 
> and valid messages being received - fails every time.  Put battery in and 
> suddenly you get the packet being decoded (which it wasn’t before – you just 
> got the data packet and no decoding)  bat_iss : 0  - wondering if this is 
> issue in driver?
>  
> John
>  
> From: weewx-user@googlegroups.com  
> mailto:weewx-user@googlegroups.com>> On Behalf 
> Of Lorin Tremblay
> Sent: September 7, 2023 11:58 PM
> To: weewx-user  >
> Subject: Re: [weewx-user] Re: weewx with rtl-davis - Installation Assistance?
>  
> Don’t remember, but tried without it, still does the same thing and it always 
> restart in the morning……
> 
> On Thursday, September 7, 2023 at 11:22:57 PM UTC-4 vince wrote:
>> Why are you setting -ex 200 ?
>> The defaults worked fine for me for multiple days with a VP2 (one ISS), FWIW.
>>  
>> On Thursday, September 7, 2023 at 8:16:53 PM UTC-7 Lorin Tremblay wrote:
>>> 
>>> It happens every night for me…
>>> On Tuesday, September 5, 2023 at 7:48:45 AM UTC-4 Lorin Tremblay wrote:
 Having the same issue about once a day for 4-6 hours
  
 Sep  5 07:34:18 WeeWx-APRS270 weewx[610] INFO weewx.engine: Main loop 
 exiting. Shutting engine down.
 Sep  5 07:34:18 WeeWx-APRS270 weewx[610] INFO user.rtldavis: shutdown 
 process /home/pi/bin/rtldavis -ex 200 -tf US -tr 1
 Sep  5 07:34:18 WeeWx-APRS270 weewx[610] INFO user.rtldavis: rtldavis with 
 pid 1847 killed
 Sep  5 07:34:18 WeeWx-APRS270 weewx[610] CRITICAL __main__: Caught 
 WeeWxIOError: rtldavis process stalled
 Sep  5 07:34:18 WeeWx-APRS270 weewx[610] CRITICAL __main__:   
 Waiting 60 seconds then retrying...
 
> 
> -- 
> You received this message because you are subscribed to a topic in the Google 
> Groups "weewx-user" group.
> To unsubscribe from this topic, visit 
> https://groups.google.com/d/topic/weewx-user/bGiQPuOljqs/unsubscribe 
> .
> To unsubscribe from this group and all its topics, send an email to 
> weewx-user+unsubscr...@googlegroups.com 
> .
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/weewx-user/f1deaaff-562d-4a6b-bf8a-10afc8dd5ed7n%40googlegroups.com
>  
> .
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "weewx-user" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to weewx-user+unsubscr...@googlegroups.com 
> .
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/weewx-user/00e301d9e5db%2436254130%24a26fc390%24%40xplornet.ca
>  
> .

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/7C14CD9E-F243-4E59-8C69-1A2B7E106DDD%40gmail.com.