Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 15 additions & 4 deletions usr/bin/tik
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# SPDX-License-Identifier: MIT
# SPDX-FileCopyrightText: Copyright 2023-2024 SUSE LLC
# SPDX-FileCopyrightText: Copyright 2023-2024 Richard Brown
# SPDX-FileCopyrightText: Copyright 2025 Tobias Görgens

# Define variables
# Style notes
Expand All @@ -12,8 +13,10 @@ tik_log=~/tik.log
tik_dir=/usr/lib/tik
tik_module="tik"

# Read libraries
# Common helpers used by tik and modules
. ${tik_dir}/lib/tik-functions
# Core installer logic used only by tik and phase scripts
. ${tik_dir}/lib/tik-core

# Start logging
exec 2> >(exec tee -i -a "${tik_log}" >&2)
Expand All @@ -26,8 +29,8 @@ if [[ $1 == "--debug" ]]; then
fi

# Check if graphical display is available
XDG_SESSION="${XDG_SESSION_TYPE:=unspecified}"
if [ $XDG_SESSION_TYPE = "wayland" ] || [ $XDG_SESSION_TYPE = "x11" ] ; then
XDG_SESSION_TYPE="${XDG_SESSION_TYPE:=unspecified}"
if [ "${XDG_SESSION_TYPE}" = "wayland" ] || [ "${XDG_SESSION_TYPE}" = "x11" ] ; then
gui=true
else
gui=false
Expand All @@ -42,6 +45,9 @@ if [ ! -d "${TIK_IMG_DIR}" ]; then
error "${TIK_IMG_DIR} does not exist"
fi

# Determine name of to-be-installed system
tik_detect_identity

cleanup() {
retval=$?
log "[STOP][${retval}] $0"
Expand All @@ -58,16 +64,21 @@ cleanup() {
}
trap cleanup EXIT

# Run pre modules
tik_init_phase_modules "pre"
load_modules "pre"
load_modules "pre" "custom"

# Select installation disk and image, then deploy image to disk
get_disk
get_img
dump_image "${TIK_INSTALL_IMAGE}" "${TIK_INSTALL_DEVICE}"
reread_partitiontable

# Run post modules
tik_init_phase_modules "post"
load_modules "post"
load_modules "post" "custom"

wipe_keyfile
set_boot_target
set_boot_target
Loading