27 lines
1.3 KiB
Bash
27 lines
1.3 KiB
Bash
# Shared offline finalization for an already composed private OS tree.
|
|
# Run inside the generation's private-network nspawn after package/ABI checks.
|
|
export LC_ALL=C
|
|
ldconfig
|
|
systemd-hwdb update --usr
|
|
if command -v glib-compile-schemas >/dev/null; then glib-compile-schemas /usr/share/glib-2.0/schemas; fi
|
|
if command -v gio-querymodules >/dev/null; then gio-querymodules /usr/lib/gio/modules; fi
|
|
if command -v update-desktop-database >/dev/null; then update-desktop-database /usr/share/applications; fi
|
|
if command -v update-mime-database >/dev/null; then update-mime-database /usr/share/mime; fi
|
|
if command -v gtk-update-icon-cache >/dev/null; then
|
|
for theme in /usr/share/icons/*; do
|
|
[[ ! -f $theme/index.theme ]] || gtk-update-icon-cache -q -t -f "$theme"
|
|
done
|
|
fi
|
|
update-ca-trust
|
|
for modules in /usr/lib/modules/*; do
|
|
[[ -f $modules/vmlinuz ]] || continue
|
|
kernel=${modules##*/}
|
|
depmod "$kernel"
|
|
config=/usr/lib/archipelago/mkinitcpio-core.conf
|
|
if [[ -f /usr/lib/archipelago/mkinitcpio-gnome.conf ]]; then
|
|
config=/usr/lib/archipelago/mkinitcpio-gnome.conf
|
|
elif [[ -f /usr/lib/archipelago/mkinitcpio-kde.conf ]]; then
|
|
config=/usr/lib/archipelago/mkinitcpio-kde.conf
|
|
fi
|
|
mkinitcpio --nocolor -c "$config" -k "$kernel" -g "$modules/initramfs.img"
|
|
done
|