Skip to content

Conversation

@Dystopian
Copy link
Contributor

Current completion only shows modules from /boot/kernel/. There are more directories with modules now in FreeBSD e.g. local modules go usually to /boot/modules/. Looks like all current directories are written in sysctl variable kern.module_path (see also kldconfig(8)). New implementation considers all these paths.

I'm not experienced in bash programming so there can be some bugs. Tested on FreeBSD 12.3.

Copy link
Owner

@scop scop left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Some comments follow.

Dystopian and others added 4 commits May 30, 2022 09:46
Co-authored-by: Ville Skyttä <ville.skytta@iki.fi>
Co-authored-by: Ville Skyttä <ville.skytta@iki.fi>
@Dystopian
Copy link
Contributor Author

should we fall back to the previous hardcoded dirs if the utility we choose to use here yields nothing?

Due to man kldload(8) won't load anything if kldconfig -r is empty. I think no sense to use old hardcoded dirs as fallback.

Directory handling is added too so I thinks it's done.


local moddir=/modules/
[[ -d $moddir ]] || moddir=/boot/kernel/
if [[ "$cur" == */* ]]; then
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have some more elaborate checks for what looks like a path in the tree, will convert this to use it after the merge.

@scop scop merged commit 66ec66e into scop:master Jul 20, 2022
@Dystopian Dystopian deleted the fix-kldload branch July 20, 2022 20:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants