-
-
Notifications
You must be signed in to change notification settings - Fork 8
Fix CONFIG_DIR to check system-wide location first #39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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: