mirror of
https://github.com/community-scripts/ProxmoxVED.git
synced 2026-02-25 05:57:26 +00:00
fix: Multiple distro issues from testing
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
This commit is contained in:
@@ -906,13 +906,13 @@ EOF
|
||||
|
||||
# Try multiple patterns to catch different inittab formats
|
||||
# Pattern 1: Standard format "1:2345:respawn:/sbin/getty..."
|
||||
sed -i -E 's|^1:[0-9]*:respawn:[^ ]*(getty|agetty)[^$]*$|1:2345:respawn:/sbin/agetty --autologin root --noclear tty1 38400 linux|' /etc/inittab
|
||||
sed -i 's|^1:[0-9]*:respawn:.*/\(a\?getty\).*|1:2345:respawn:/sbin/agetty --autologin root --noclear tty1 38400 linux|' /etc/inittab
|
||||
|
||||
# Pattern 2: With console instead of tty1
|
||||
sed -i -E 's|^c1:[0-9]*:respawn:[^ ]*(getty|agetty).*console.*$|c1:2345:respawn:/sbin/agetty --autologin root --noclear console 38400 linux|' /etc/inittab
|
||||
sed -i 's|^c1:[0-9]*:respawn:.*/\(a\?getty\).*console.*|c1:2345:respawn:/sbin/agetty --autologin root --noclear console 38400 linux|' /etc/inittab
|
||||
|
||||
# Pattern 3: Devuan specific "co:2345:respawn:/sbin/getty..."
|
||||
sed -i -E 's|^co:[0-9]*:respawn:[^ ]*(getty|agetty).*$|co:2345:respawn:/sbin/agetty --autologin root --noclear console 38400 linux|' /etc/inittab
|
||||
sed -i 's|^co:[0-9]*:respawn:.*/\(a\?getty\).*|co:2345:respawn:/sbin/agetty --autologin root --noclear console 38400 linux|' /etc/inittab
|
||||
|
||||
# Pattern 4: LXC console pattern
|
||||
if ! grep -q 'autologin root' /etc/inittab; then
|
||||
|
||||
Reference in New Issue
Block a user