Update enable_anaconda.sh
This commit is contained in:
+29
-63
@@ -1,18 +1,20 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -eoux pipefail
|
set -eoux pipefail
|
||||||
|
|
||||||
# -------------------------------------------------------------------
|
|
||||||
# Image metadata
|
|
||||||
# -------------------------------------------------------------------
|
|
||||||
IMAGE_INFO="$(cat /usr/share/ublue-os/image-info.json)"
|
IMAGE_INFO="$(cat /usr/share/ublue-os/image-info.json)"
|
||||||
IMAGE_TAG="$(jq -r '."image-tag"' <<<"$IMAGE_INFO")"
|
|
||||||
IMAGE_REF="$(jq -r '."image-ref"' <<<"$IMAGE_INFO")"
|
IMAGE_REF="$(jq -r '."image-ref"' <<<"$IMAGE_INFO")"
|
||||||
|
IMAGE_TAG="$(jq -r '."image-tag"' <<<"$IMAGE_INFO")"
|
||||||
IMAGE_REF="${IMAGE_REF##*://}"
|
IMAGE_REF="${IMAGE_REF##*://}"
|
||||||
|
|
||||||
# -------------------------------------------------------------------
|
# --- Live UX -------------------------------------------------------------
|
||||||
# Prevent suspend during installation (Anaconda requirement)
|
|
||||||
# -------------------------------------------------------------------
|
tee /usr/share/glib-2.0/schemas/zz-installer.gschema.override <<'EOF'
|
||||||
tee /usr/share/glib-2.0/schemas/zz3-fluffy-pancake-installer-power.gschema.override <<'EOF'
|
[org.gnome.shell]
|
||||||
|
welcome-dialog-last-shown-version='4294967295'
|
||||||
|
favorite-apps = ['liveinst.desktop', 'org.mozilla.firefox.desktop', 'org.gnome.Nautilus.desktop']
|
||||||
|
EOF
|
||||||
|
|
||||||
|
tee /usr/share/glib-2.0/schemas/zz-installer-power.gschema.override <<'EOF'
|
||||||
[org.gnome.settings-daemon.plugins.power]
|
[org.gnome.settings-daemon.plugins.power]
|
||||||
sleep-inactive-ac-type='nothing'
|
sleep-inactive-ac-type='nothing'
|
||||||
sleep-inactive-battery-type='nothing'
|
sleep-inactive-battery-type='nothing'
|
||||||
@@ -25,70 +27,34 @@ EOF
|
|||||||
|
|
||||||
glib-compile-schemas /usr/share/glib-2.0/schemas
|
glib-compile-schemas /usr/share/glib-2.0/schemas
|
||||||
|
|
||||||
# -------------------------------------------------------------------
|
rm -f /etc/xdg/autostart/org.gnome.Software.desktop || true
|
||||||
# Install Anaconda (GNOME backend is implicit)
|
|
||||||
# -------------------------------------------------------------------
|
# --- Installer -----------------------------------------------------------
|
||||||
|
|
||||||
dnf install -y \
|
dnf install -y \
|
||||||
anaconda-webui \
|
anaconda \
|
||||||
cockpit-ws \
|
anaconda-gui \
|
||||||
cockpit-bridge \
|
anaconda-live \
|
||||||
libblockdev-btrfs \
|
libblockdev-btrfs \
|
||||||
libblockdev-lvm \
|
libblockdev-lvm \
|
||||||
libblockdev-dm \
|
libblockdev-dm \
|
||||||
firefox
|
firefox
|
||||||
|
|
||||||
# -------------------------------------------------------------------
|
tee /usr/share/applications/liveinst.desktop <<'EOF'
|
||||||
# Anaconda profile (Fluffy Pancake)
|
[Desktop Entry]
|
||||||
# -------------------------------------------------------------------
|
Name=Install System
|
||||||
tee /etc/anaconda/profile.d/fluffy-pancake.conf <<'EOF'
|
Comment=Install this system to disk
|
||||||
[Profile]
|
Exec=anaconda
|
||||||
profile_id = fluffy-pancake
|
Icon=system-installer
|
||||||
|
Terminal=false
|
||||||
[Profile Detection]
|
Type=Application
|
||||||
os_id = fluffy-pancake
|
Categories=System;Installer;
|
||||||
|
|
||||||
[Network]
|
|
||||||
default_on_boot = FIRST_WIRED_WITH_LINK
|
|
||||||
|
|
||||||
[Bootloader]
|
|
||||||
efi_dir = fedora
|
|
||||||
menu_auto_hide = True
|
|
||||||
|
|
||||||
[Storage]
|
|
||||||
default_scheme = BTRFS
|
|
||||||
btrfs_compression = zstd:1
|
|
||||||
|
|
||||||
[Localization]
|
|
||||||
use_geolocation = False
|
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
# -------------------------------------------------------------------
|
update-desktop-database /usr/share/applications || true
|
||||||
# OS identity (installer + installed system)
|
|
||||||
# -------------------------------------------------------------------
|
|
||||||
sed -i 's/^ID=.*/ID=fluffy-pancake/' /usr/lib/os-release
|
|
||||||
grep -q '^VARIANT_ID=' /usr/lib/os-release || \
|
|
||||||
echo 'VARIANT_ID=fluffy-pancake' >> /usr/lib/os-release
|
|
||||||
|
|
||||||
. /etc/os-release
|
# --- Kickstart -----------------------------------------------------------
|
||||||
echo "Fluffy Pancake release $VERSION_ID ($VERSION_CODENAME)" > /etc/system-release
|
|
||||||
|
|
||||||
# -------------------------------------------------------------------
|
|
||||||
# Minimal Anaconda branding (no GNOME UX tweaks)
|
|
||||||
# -------------------------------------------------------------------
|
|
||||||
sed -i -e 's/Fedora/Fluffy Pancake/g' \
|
|
||||||
-e 's/CentOS/Fluffy Pancake/g' \
|
|
||||||
/usr/share/anaconda/gnome/org.fedoraproject.welcome-screen.desktop || true
|
|
||||||
|
|
||||||
# -------------------------------------------------------------------
|
|
||||||
# Kickstart: install THIS image
|
|
||||||
# -------------------------------------------------------------------
|
|
||||||
tee /usr/share/anaconda/interactive-defaults.ks <<EOF
|
tee /usr/share/anaconda/interactive-defaults.ks <<EOF
|
||||||
ostreecontainer --url=$IMAGE_REF:$IMAGE_TAG --transport=containers-storage --no-signature-verification
|
ostreecontainer --url=${IMAGE_REF}:${IMAGE_TAG} --transport=containers-storage --no-signature-verification
|
||||||
%end
|
|
||||||
EOF
|
|
||||||
|
|
||||||
tee /usr/share/anaconda/post-scripts/install-configure-upgrade.ks <<EOF
|
|
||||||
%post --erroronfail
|
|
||||||
bootc switch --mutate-in-place --transport registry $IMAGE_REF:$IMAGE_TAG
|
|
||||||
%end
|
|
||||||
EOF
|
EOF
|
||||||
|
|||||||
Reference in New Issue
Block a user