Skip to content

Commit

Permalink
Merge pull request #136 from endlessm/T35040-initial-setup-vendor-con…
Browse files Browse the repository at this point in the history
…f-path

Update gnome-initial-setup vendor configuration path
  • Loading branch information
wjt authored Dec 7, 2023
2 parents 6406ebe + 7476684 commit 0ecd4e0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 23 deletions.
2 changes: 1 addition & 1 deletion config/defaults.ini
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ branding_desktop_config =
branding_desktop_logo =

# Brand-specific configuration for the First Boot Experience
branding_fbe_config = ${build:datadir}/branding/gnome-initial-setup/default/gnome-initial-setup.conf
branding_fbe_config =

# Environment variables to substitute in branding configuration files
branding_subst_vars_add =
Expand Down

This file was deleted.

22 changes: 5 additions & 17 deletions hooks/image/50-branding-fbe
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Adds the configuration file and assets to customize the welcome page of the FBE.
# Adds a configuration file to customise GNOME Initial Setup.
#
# The file will live in /var/lib/eos-image-defaults/branding/gnome-initial-setup.conf,
# and any related resources (e.g. logo) under /var/lib/eos-image-defaults/branding/assets.
# The file will live in /etc/gnome-initial-setup/vendor.conf.

if [ -z "${EIB_IMAGE_BRANDING_FBE_CONFIG}" ]; then
exit 0
Expand All @@ -14,18 +13,7 @@ if [ "$CHECK" != OK ]; then
exit 1
fi

CONFIG_DIR="${OSTREE_VAR}"/lib/eos-image-defaults/branding
CONFIG_PATH="${OSTREE_DEPLOYMENT}"/etc/gnome-initial-setup/vendor.conf

mkdir -p "${CONFIG_DIR}"
cp "${EIB_IMAGE_BRANDING_FBE_CONFIG}" "${CONFIG_DIR}"/

CONFIG_BASENAME=$(basename "${EIB_IMAGE_BRANDING_FBE_CONFIG}")

for SUBST_VAR in ${EIB_IMAGE_BRANDING_SUBST_VARS}; do
sed -i "s|@${SUBST_VAR}@|${!SUBST_VAR}|g" "${CONFIG_DIR}"/"${CONFIG_BASENAME}"
done

# The skipped pages file and the logo are optional
if [ -n "${EIB_IMAGE_BRANDING_FBE_SKIP_PAGES_FILE}" ]; then
cp "${EIB_IMAGE_BRANDING_FBE_SKIP_PAGES_FILE}" "${CONFIG_DIR}"/
fi
mkdir -p "$(dirname "$CONFIG_PATH")"
cp "${EIB_IMAGE_BRANDING_FBE_CONFIG}" "$CONFIG_PATH"

0 comments on commit 0ecd4e0

Please sign in to comment.