Re: Proposed new /etc/rc.d/drvctl script

2025-04-18 Thread Paul Goyette
On Thu, 17 Apr 2025, Paul Goyette wrote: If autoconfiguration could match on vendor and product it you express this better in the config file. It can match. Here's my config for my APC UPS: # APC UPS ugen0 at uhub? port ? vendor 0x051d product 0x0002 And dmesg shows [ 2.222653] ugen

Re: Proposed new /etc/rc.d/drvctl script

2025-04-18 Thread Christoph Badura
On Thu, Apr 17, 2025 at 09:17:49AM -0700, Paul Goyette wrote: > >If autoconfiguration could match on vendor and product it you express this > >better in the config file. > > It can match. Here's my config for my APC UPS: > > # APC UPS > ugen0 at uhub? port ? vendor 0x051d product 0x0002

Re: Proposed new /etc/rc.d/drvctl script

2025-04-17 Thread Christoph Badura
On Wed, Apr 09, 2025 at 09:32:02PM +0700, Robert Elz wrote: > Date:Wed, 9 Apr 2025 11:16:10 +0200 > From:Christoph Badura > Message-ID: <20250409091610.ga28...@irregular-apocalypse.k.bsd.de> > > | How do you plan to get rid of the script once we've fixed the underly

Re: Proposed new /etc/rc.d/drvctl script

2025-04-17 Thread Paul Goyette
If autoconfiguration could match on vendor and product it you express this better in the config file. It can match. Here's my config for my APC UPS: # APC UPS ugen0 at uhub? port ? vendor 0x051d product 0x0002 +-+--+--+ | Pau

Re: Proposed new /etc/rc.d/drvctl script

2025-04-10 Thread Christoph Badura
Isn't this barking up the wrong tree? First of all, WTF amdsmn4)? Apparently there is no man page. Our autoconfiguration system handles this case just fine with match priorities. That should work for modules too. martin@ noted this in the PR. I recently came into a possession of an Infinite N

Re: Proposed new /etc/rc.d/drvctl script

2025-04-10 Thread Paul Goyette
echo '$start_precmd="$start_precmd; drvctl -d pchb0' >> /etc/rc.conf.d/modules Getting close... # more /etc/rc.conf.d/modules $start_precmd="$start_precmd; drvctl -d pchb0" # more /var/run/rc.log [/etc/rc starting at Thu Apr 10 06:17:10 PDT 2025] [running rcorder] [running /etc/rc.d/wdogctl] [r

Re: Proposed new /etc/rc.d/drvctl script

2025-04-10 Thread Christoph Badura
On Wed, Apr 09, 2025 at 10:01:01AM -0700, Paul Goyette wrote: > On Wed, 9 Apr 2025, Paul Goyette wrote: > >>This isn't even necessary. You can just as well add the necessary drvctl > >>commands to $start_precmd in /etc/rc.conf.d/modules. > > > >Hmmm, hadn't thought of that. I will investigate. >

Re: Proposed new /etc/rc.d/drvctl script

2025-04-10 Thread Robert Elz
Date:Thu, 10 Apr 2025 14:25:45 +0200 From:Christoph Badura Message-ID: <20250410122545.ga26...@irregular-apocalypse.k.bsd.de> | echo '$start_precmd="$start_precmd; drvctl -d pchb0' >> /etc/rc.conf.d/modules That would want to be: echo 'start_precmd=${start_precmd

Re: Proposed new /etc/rc.d/drvctl script

2025-04-10 Thread Paul Goyette
This seems to work just fine: start_precmd="modules_precmd" modules_precmd() { drvctl -d pchb0 return 0 } The "return 0" allows the drvctl to fail (if, perhaps, the pchb0 has already been deleted). Otherwise, an error exit prevent

Re: Proposed new /etc/rc.d/drvctl script

2025-04-10 Thread Paul Goyette
On Thu, 10 Apr 2025, Iain Hibbert wrote: modules is a shell script and you have extranous $ and missing " as the precmd is a command #!/bin/sh start_precmd="modules_prestart" modules_prestart() { drvctl -d pchb0 } would probably do it.. I don't know that you need to care about a pre

Re: Proposed new /etc/rc.d/drvctl script

2025-04-10 Thread Iain Hibbert
On Thu, 10 Apr 2025, Paul Goyette wrote: > > echo '$start_precmd="$start_precmd; drvctl -d pchb0' >> > > /etc/rc.conf.d/modules > > Getting close... > > # more /etc/rc.conf.d/modules > $start_precmd="$start_precmd; drvctl -d pchb0" > # more /var/run/rc.log > [/etc/rc starting at Thu Apr 10 06:17:1

Re: Proposed new /etc/rc.d/drvctl script

2025-04-10 Thread Christoph Badura
On Thu, Apr 10, 2025 at 01:20:09AM +0700, Robert Elz wrote: > Date:Wed, 9 Apr 2025 10:01:01 -0700 (PDT) > From:Paul Goyette > Message-ID: > > | Thanks this works fine with the precmd defined in rc.d/modules. Now I > | just gotta figure out the syntax for putting

Re: Proposed new /etc/rc.d/drvctl script

2025-04-09 Thread Robert Elz
Date:Wed, 9 Apr 2025 10:01:01 -0700 (PDT) From:Paul Goyette Message-ID: | Thanks this works fine with the precmd defined in rc.d/modules. Now I | just gotta figure out the syntax for putting it in the rc.conf file. There's no syntax for that. pre (and post) c

Re: Proposed new /etc/rc.d/drvctl script

2025-04-09 Thread Paul Goyette
On Thu, 10 Apr 2025, Robert Elz wrote: Using it for this is no better (and no reason in this case to do it that way) that just modifying the rc.d/modules start command to include a drvctl line before the loop reading its config file. Either way (adding a precmd or just modifying the start comm

Re: Proposed new /etc/rc.d/drvctl script

2025-04-09 Thread Paul Goyette
On Wed, 9 Apr 2025, Paul Goyette wrote: This isn't even necessary. You can just as well add the necessary drvctl commands to $start_precmd in /etc/rc.conf.d/modules. Hmmm, hadn't thought of that. I will investigate. Thanks this works fine with the precmd defined in rc.d/modules. Now I jus

Re: Proposed new /etc/rc.d/drvctl script

2025-04-09 Thread Valery Ushakov
On Mon, Apr 07, 2025 at 23:58:13 -0700, Paul Goyette wrote: > attachment. Later, when the amdsmn module is loaded, it cannot > attach in the device tree because the attachment point is already > occupied by pchb. If you use drvctl to delete the pchb instance you > can then load the module and amd

Re: Proposed new /etc/rc.d/drvctl script

2025-04-09 Thread Paul Goyette
On Wed, 9 Apr 2025, Christoph Badura wrote: This isn't even necessary. You can just as well add the necessary drvctl commands to $start_precmd in /etc/rc.conf.d/modules. Hmmm, hadn't thought of that. I will investigate. +-+--+

Re: Proposed new /etc/rc.d/drvctl script

2025-04-09 Thread Christoph Badura
On Wed, Apr 09, 2025 at 03:11:41AM -0700, Paul Goyette wrote: > On Wed, 9 Apr 2025, Christoph Badura wrote: > >Isn't this barking up the wrong tree? > >First of all, WTF amdsmn4)? Apparently there is no man page. > > AMD system management bus. Talk to riastradh about the missing man > page! :)

Re: Proposed new /etc/rc.d/drvctl script

2025-04-09 Thread Robert Elz
Date:Wed, 9 Apr 2025 11:16:10 +0200 From:Christoph Badura Message-ID: <20250409091610.ga28...@irregular-apocalypse.k.bsd.de> | How do you plan to get rid of the script once we've fixed the underlying | issues. I doubt there would be any need for that -- it is off

Re: Proposed new /etc/rc.d/drvctl script

2025-04-09 Thread Paul Goyette
On Wed, 9 Apr 2025, Christoph Badura wrote: Isn't this barking up the wrong tree? First of all, WTF amdsmn4)? Apparently there is no man page. AMD system management bus. Talk to riastradh about the missing man page! :) amdsmn provides an attachment for amdzentemp(4) sensor. Our autoconf

Re: Proposed new /etc/rc.d/drvctl script

2025-04-08 Thread Robert Elz
Date:Tue, 8 Apr 2025 08:19:38 -0700 (PDT) From:Paul Goyette Message-ID: | A of your comments appearto address "structural" issue, and | all of them exist in the original modules script. Yes, and I have no idea about the latter, no reason to look, none of my

Re: Proposed new /etc/rc.d/drvctl script

2025-04-08 Thread Paul Goyette
On Wed, 9 Apr 2025, Robert Elz wrote: Date:Tue, 8 Apr 2025 08:19:38 -0700 (PDT) From:Paul Goyette Message-ID: | A of your comments appearto address "structural" issue, and | all of them exist in the original modules script. Yes, and I have no idea about the la

Re: Proposed new /etc/rc.d/drvctl script

2025-04-08 Thread Paul Goyette
A of your comments appearto address "structural" issue, and all of them exist in the original modules script. Unless the current stuff is actually broken, I am inclined to commit this version, with an invitation to you and other to address and structural improvements. Thank you for not objec

Re: Proposed new /etc/rc.d/drvctl script

2025-04-08 Thread Robert Elz
Date:Mon, 7 Apr 2025 23:58:13 -0700 (PDT) From:Paul Goyette Message-ID: Looks good to me, though in this part: | *) | ( | set -o noglob |