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:
MickLesk 2026-01-12 21:58:15 +01:00
parent b8afdab106
commit 3d6a5f58b0
3 changed files with 3414 additions and 3369 deletions

View File

@ -5,10 +5,9 @@ source <(curl -fsSL https://git.community-scripts.org/community-scripts/ProxmoxV
# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE
# Source: https://www.openeuler.org/
# NOTE: openEuler requires privileged container due to PVE limitation
# PVE's post_create_hook expects /etc/redhat-release which openEuler doesn't have
# This causes "unable to create CT - error in setup task PVE::LXC::Setup::post_create_hook"
# Setting var_unprivileged=0 creates privileged container which bypasses this check
# NOTE: openEuler has a PVE compatibility issue
# PVE's post_create_hook expects /etc/redhat-release which openEuler doesn't have by default
# We handle this in build.func by creating the file after container creation
APP="openEuler"
var_tags="${var_tags:-os}"
@ -17,7 +16,7 @@ var_ram="${var_ram:-512}"
var_disk="${var_disk:-4}"
var_os="${var_os:-openeuler}"
var_version="${var_version:-25.03}"
var_unprivileged="${var_unprivileged:-0}"
var_unprivileged="${var_unprivileged:-1}"
header_info "$APP"
variables

File diff suppressed because it is too large Load Diff

View File

@ -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