Skip to content

Commit 5088e15

Browse files
author
hiburger
committed
2 parents 9f0e5ea + dd02151 commit 5088e15

File tree

1 file changed

+45
-5
lines changed

1 file changed

+45
-5
lines changed

02-configure-system.sh

Lines changed: 45 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
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

109
set -e
@@ -17,7 +16,47 @@ echo "====================================================="
1716
echo "PHASE 2: Configuring LuminOS Base System"
1817
echo "====================================================="
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

2261
chmod +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
3069
echo "--> Unmounting virtual filesystems..."
3170
umount "$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."
3474
echo "Next step: 03-install-desktop.sh"
3575
exit 0

0 commit comments

Comments
 (0)