Add live user with specific UID of 1100
- Updated the user creation script to assign the live user a specific UID (1100). This ensures consistency in the user ID for the installed environment.
Add POOL_Size variable to improve flexibility and maintainability
Define a variable, POOL_SIZE='6g', to makes it easier to adjust the size in the future if needed.
Improve error handling for ZFS pool creation in workspace function
Commit summary:
- Enhanced error handling for zpool create in the workspace() function.
- Replaced indirect exit code check with a direct check using if !.
- Added detailed error messages to make debugging easier when pool creation fails.
- Implemented cleanup steps to remove any partially created resources (e.g., ZFS pool, memory disk, pool image) on failure.
- Ensured that the system remains in a clean state when an error occurs.
- Improved readability and robustness of the workspace() function by refactoring redundant checks.
feat: Optimize ZFS commands and improve error handling in build script
Optimize ZFS commands and improve error handling in build script
- Optimized `zpool create` by using `-O` options to set mountpoint and compression during pool creation, reducing redundant `zfs set` commands.
- Added error handling after `zpool create` to ensure the script exits if pool creation fails, preventing further steps from executing on a failed pool.
- Improved `zfs send` command by using the `-p` flag to preserve properties, optimizing performance for future operations.
- Enhanced the ZFS pool export check in the `boot` function by adding a timeout mechanism to avoid potential infinite loops, providing a clearer failure path.
- Overall improvements to script reliability and performance in managing ZFS operations.
Optimize find usage in script to reduce unnecessary commands
Optimize find usage in script to reduce unnecessary commands
- Replaced grep and cut with more efficient find options
- Used basename in find to directly extract filenames
- Simplified tr usage to convert newlines into spaces
Add hgame to kld_list
The hgame driver "provides support for generic game controllers" which is extremely helpful for a desktop implementation of an operating system since most people like games. Some games throw fatal errors if it is not loaded even if a gamepad is not intended to be connected.