How to get a list of all kernel modules
[LoN]Kamikaze
LoN_Kamikaze at gmx.de
Sun Jun 17 07:05:58 UTC 2007
M. Warner Losh wrote:
> In message: <4674D5B2.4000104 at gmx.de>
> "[LoN]Kamikaze" <LoN_Kamikaze at gmx.de> writes:
> : I see I misunderstood, sorry about that. So how about that one:
> :
> : # find /usr/ports/ -type f -name pkg-plist -exec grep -El
> : '^@cwd[[:space:]]+/boot' \{} \; | sed -E 's|^/usr/ports/||1' | sed -E
> : 's|/pkg-plist$||1'
> :
> : It only works with ports that have a pkg-plist file, though.
>
> This won't quite work because there are things like:
>
> % cat multimedia/pvr250/pkg-plist
> @unexec rm %%MODULESDIR%%/cxm.ko
> @unexec rm %%MODULESDIR%%/cxm_iic.ko
> bin/pvr250-setchannel
>
> I'd kinda hoped there was a pseudo category that I could key off of.
> pvr250 is also kinda a mess too, since I can't build it w/o a CD I
> don't have...
>
> Warner
The only completely reliable way I see is to install all ports, because the
TMPPLIST only reaches its final state in the post-install target.
Then you could use my first solution, to grep through the output of
pkg_info -qaL
More information about the freebsd-ports
mailing list