Fix CONFIG_DIR to check system-wide location first#39
Merged
ericbsd merged 1 commit intoghostbsd:masterfrom Nov 17, 2025
Merged
Fix CONFIG_DIR to check system-wide location first#39ericbsd merged 1 commit intoghostbsd:masterfrom
ericbsd merged 1 commit intoghostbsd:masterfrom
Conversation
The CONFIG_DIR was hardcoded to "$SCRIPT_DIR/cardDetect", causing the script to look for configuration templates in /usr/local/bin/cardDetect when installed via the port, rather than the correct system-wide location at /usr/local/etc/X11/cardDetect. This change updates the CONFIG_DIR initialization to: 1. Check /usr/local/etc/X11/cardDetect first (system-wide installation) 2. Fall back to $SCRIPT_DIR/cardDetect (development/portable usage) This matches the documented dual-location behavior in README.md and ensures the script works correctly when installed via the x11/xconfig port, which installs config templates to /usr/local/etc/X11/cardDetect per the Makefile. The script now functions correctly in both scenarios: - Production: Installed via pkg/port with configs in /usr/local/etc/X11 - Development: Run in-tree with configs in ./cardDetect Fixes issue where xconfig couldn't find XF86Config.* templates during GhostBSD bootstrap when installed from package.
Reviewer's guide (collapsed on small PRs)Reviewer's GuideThis pull request refactors the CONFIG_DIR initialization in the xconfig script to detect and prefer a system-wide configuration directory before falling back to the bundled development path, aligning actual behavior with the README documentation and ensuring correct operation when installed via package or run in-tree. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
ericbsd
approved these changes
Nov 17, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The CONFIG_DIR was hardcoded to "$SCRIPT_DIR/cardDetect", causing the script to look for configuration templates in /usr/local/bin/cardDetect when installed via the port, rather than the correct system-wide location at /usr/local/etc/X11/cardDetect.
This change updates the CONFIG_DIR initialization to:
This matches the documented dual-location behavior in README.md and ensures the script works correctly when installed via the x11/xconfig port, which installs config templates to /usr/local/etc/X11/cardDetect per the Makefile.
The script now functions correctly in both scenarios:
Fixes issue where xconfig couldn't find XF86Config.* templates during GhostBSD bootstrap when installed from package.
Summary by Sourcery
Update config directory lookup to first check the system-wide installation path and fall back to the local directory, restoring the documented dual-location behavior and fixing template resolution when installed via the x11/xconfig port.
Bug Fixes:
Enhancements: