LXC containers use /dev/console, not tty1!
- pct console connects to /dev/console device
- Added explicit console entry in inittab for LXC
- tty1 autologin still works for direct access
- Fixes autologin not working in Devuan containers
Devuan:
- Fixed sed syntax error: replaced -E with BRE, removed invalid [^$] pattern
- Simplified regex patterns for inittab autologin matching
openEuler:
- Added template patching to inject /etc/redhat-release before pct create
- This fixes 'error in setup task PVE::LXC::Setup::post_create_hook'
- Reverted to unprivileged container (privileged not needed with patch)
openSUSE:
- Added --gpg-auto-import-keys to zypper to avoid interactive GPG prompts
- This was causing the 15+ minute hangs during package manager init
Gentoo:
- Changed to use emerge-webrsync (http) instead of emerge --sync (rsync)
- webrsync is significantly faster than full rsync sync
- Install curl FIRST before other packages (required for install.func)
- Better error handling with separate curl check
Rocky Linux DNS issue:
- Not a script bug - container network/DNS not working
- User should check container gateway and DNS settings
- Rocky/AlmaLinux 10 (EL10): Version detection for DNF 5 with correct packages (langpacks-en instead of glibc-langpack-en), makecache refresh, fallback to minimal install
- openSUSE: Install ncurses-utils and terminfo-base, set TERM in /etc/profile.d and /etc/environment to fix 'unknown terminal type'
- Gentoo: Fixed template pattern to use underscore (-openrc_) instead of dash, special version handling
- openEuler: Set privileged container (var_unprivileged=0) to workaround PVE setup hook limitation
- Devuan: Enhanced sysvinit autologin with multiple inittab patterns, fallback console entry, telinit reload
- CentOS/all: Updated URLs from raw.githubusercontent.com to git.community-scripts.org
- General: Better error handling and removed duplicate code blocks
- Gentoo: Fix template pattern to match 'gentoo-current-openrc' naming
- openSUSE: Sanitize ANSI escape codes from MSG_INFO_SHOWN array keys
- Devuan: Use flexible runlevel matching for sysvinit autologin
- CentOS/RHEL: Add missing '-' before $TERM in agetty commands
Fixes reported issues:
- Gentoo template not found (wrong pattern '-current_')
- openSUSE 'not a valid identifier' error on msg_ok with color codes
- Devuan autologin failing due to strict runlevel pattern
- CentOS autologin improvements for LXC console
The update script now uses the OS variable for OS-based containers instead of the app name, and the script source URL has been updated to use git.community-scripts.org. This ensures the correct update script is fetched for each container type.
Refines the configuration of getty services for auto-login in LXC containers. Adds explicit handling for console-getty.service (used in Fedora/RHEL) and container-getty@1.service (Debian/Ubuntu), ensuring proper override and enabling where necessary.
Simplifies and improves auto-login configuration for systemd, openrc, and sysvinit. Removes unnecessary service reloads and restarts during installation, and directly modifies configuration files where appropriate.
Refactored build.func to use a unified install.func for all supported OS types, simplifying OS detection and package installation. Added cleanup_lxc step to all install scripts. Removed support for runit, pacman, and nix-env from install.func, and improved SSH server installation logic for containers. Updated template pattern matching for additional OS types.
Changed all function bodies in misc/build.func to use 2-space indentation for improved readability and consistency. No logic changes were made; only whitespace and indentation were updated.
Expanded IPv6 configuration in build.func to include a 'disable' option with clearer descriptions. Updated install.func to use IPV6_METHOD for disabling IPv6 via sysctl.d, improving clarity and control over IPv6 management.
Changed PCT_OPTIONS from an array to a string for proper export and compatibility with Proxmox pct. Features are now passed as a comma-separated string. Also updated install.func to use a literal heredoc for systemd override configuration.
Cleaned up dev mode and persistent log directory logic from build.func and install.func. Network connectivity status messages are now more direct, and unnecessary exports and re-parsing of dev_mode have been removed for clarity and maintainability.
Introduces granular dev_mode flags (motd, keep, trace, pause, breakpoint, logs, dryrun) with a parser and exports for container builds. Enables persistent log directories when logs mode is active, supports dryrun and trace modes, and adds MOTD/SSH setup and breakpoint shell for debugging. Refactors related logic in build.func, core.func, and install.func for improved developer experience and debugging.
Introduces distinct BUILD_LOG and INSTALL_LOG variables for host and container operations, ensuring logs are properly captured and retrievable. Refactors silent execution and error handling to use the active log file, improves log copying after failures, and enhances context detection for log management. Also adds fallback logic for INSTALL_LOG initialization in install.func.
Expanded inline documentation and section headers across misc/api.func, misc/build.func, misc/core.func, misc/error_handler.func, and misc/install.func for improved maintainability and clarity. Refactored error handling to use centralized explain_exit_code and updated API telemetry/reporting logic. Enhanced modularity and structure of utility, validation, and setup functions, and improved comments for user guidance and developer onboarding.
Replaces all occurrences of the 'init_error_traps' function with 'catch_errors' across container and install scripts for consistency in error handling. Also adjusts indentation and formatting in some scripts for improved readability.