11#! /bin/bash
2-
32# ==============================================================================
4- # LuminOS Build Script, Phase 2: System Configuration
3+ # LuminOS Build Script - Phase 2: System Configuration
54#
65# Author: Gabriel, Project Leader @ LuminOS
7- # Version: 0.2.2
6+ # Version: 0.2.3
87# ==============================================================================
98
109set -e
@@ -17,7 +16,47 @@ echo "====================================================="
1716echo " PHASE 2: Configuring LuminOS Base System"
1817echo " ====================================================="
1918
20- cat > " $LUMINOS_CHROOT_DIR /tmp/configure.sh" # ... (Le contenu du script interne reste identique)
19+ cat > " $LUMINOS_CHROOT_DIR /tmp/configure.sh" << "EOF "
20+ #!/bin/bash
21+ set -e
22+ export DEBIAN_FRONTEND=noninteractive # This is the critical fix
23+
24+ echo "--> Configuring APT sources..."
25+ cat > /etc/apt/sources.list << "SOURCES"
26+ deb http://deb.debian.org/debian trixie main contrib non-free-firmware
27+ deb-src http://deb.debian.org/debian trixie main contrib non-free-firmware
28+ deb http://security.debian.org/debian-security trixie-security main contrib non-free-firmware
29+ deb-src http://security.debian.org/debian-security trixie-security main contrib non-free-firmware
30+ deb http://deb.debian.org/debian trixie-updates main contrib non-free-firmware
31+ deb-src http://deb.debian.org/debian trixie-updates main contrib non-free-firmware
32+ SOURCES
33+ echo "--> Updating package lists and upgrading system..."
34+ apt-get update
35+ apt-get -y upgrade
36+ echo "--> Setting hostname to LuminOS..."
37+ echo "LuminOS" > /etc/hostname
38+ echo "--> Setting timezone to Europe/Zurich..."
39+ ln -sf /usr/share/zoneinfo/Europe/Zurich /etc/localtime
40+ echo "--> Configuring locales..."
41+ echo "en_US.UTF-8 UTF-8" > /etc/locale.gen
42+ locale-gen
43+ update-locale LANG="en_US.UTF-8"
44+
45+ if [ "$CI" = "true" ]; then
46+ echo "--> CI environment detected. Setting dummy passwords..."
47+ echo "root:luminos-ci" | chpasswd
48+ useradd -m -s /bin/bash -G sudo,audio,video,netdev,plugdev liveuser
49+ echo "liveuser:luminos-ci" | chpasswd
50+ else
51+ echo "--> Setting root password (interactive)..."
52+ passwd root
53+ echo "--> Creating live user 'liveuser' (interactive)..."
54+ useradd -m -s /bin/bash -G sudo,audio,video,netdev,plugdev liveuser
55+ echo "--> Setting password for 'liveuser' (interactive)..."
56+ passwd liveuser
57+ fi
58+ rm /tmp/configure.sh
59+ EOF
2160
2261chmod +x " $LUMINOS_CHROOT_DIR /tmp/configure.sh"
2362
@@ -30,6 +69,7 @@ chroot "$LUMINOS_CHROOT_DIR" env -i PATH=/usr/local/sbin:/usr/local/bin:/usr/sbi
3069echo " --> Unmounting virtual filesystems..."
3170umount " $LUMINOS_CHROOT_DIR /sys" ; umount " $LUMINOS_CHROOT_DIR /proc" ; umount " $LUMINOS_CHROOT_DIR /dev/pts" ; umount " $LUMINOS_CHROOT_DIR /dev"
3271
33- echo -e " \nSUCCESS: LuminOS base system configured."
72+ echo " "
73+ echo " SUCCESS: LuminOS base system configured."
3474echo " Next step: 03-install-desktop.sh"
3575exit 0
0 commit comments