kaliish-orange-theme/debian/kali-desktop-base.prerm
Raphaël Hertzog e9aebab34e Review maintainer scripts
In prerm, don't drop the alternatives going through "active-theme" they are
the responsibility of desktop-base. In postinst, continue to create them
to update them in case the new kali theme provides the file that the
former theme did not.

Fix the check protecteding the call to plymouth-set-default to use a
version that actually existed in kali-themes even though we don't really
have an upgrade case where we wanted to call the command. But it will
make it easier to force a re-run in the future, in case we change the
name of the plymouth theme.
2019-11-01 19:47:11 +01:00

104 lines
2.8 KiB
Bash

#!/bin/sh
set -e
if [ "$1" = "remove" ] || [ "$1" = "deconfigure" ]; then
# Remove vendor logos alternative, all slaves get removed automatically
update-alternatives --remove \
vendor-logos \
/usr/share/desktop-base/kali-logos
# Remove background alternatives for theme packages
while read theme filename; do
update-alternatives --remove \
desktop-background \
/usr/share/desktop-base/$theme-theme/wallpaper/contents/images/$filename $priority
done << EOF
kali 1024x768.svg
kali 1280x720.svg
kali 1280x800.svg
kali 1280x1024.svg
kali 1600x1200.svg
kali 1920x1080.svg
kali 1920x1200.svg
kali 2560x1440.svg
kali 2560x1600.svg
kali 3840x2160.svg
EOF
# Remove desktop-background.xml alternatives
# For theme packages
while read theme; do
update-alternatives --remove \
desktop-background.xml \
/usr/share/desktop-base/$theme-theme/wallpaper/gnome-background.xml $priority
done << EOF
kali
EOF
# Remove desktop-lockscreen.xml alternatives
# For theme packages
while read theme; do
update-alternatives --remove \
desktop-lockscreen.xml \
/usr/share/desktop-base/$theme-theme/lockscreen/gnome-background.xml $priority
done << EOF
kali
EOF
# Remove Plasma 5/KDE wallpaper alternatives
# For theme packages
while read theme; do
update-alternatives --remove \
desktop-plasma5-wallpaper \
/usr/share/desktop-base/$theme-theme/wallpaper
done << EOF
kali
EOF
# Remove login theme alternatives
# For theme packages
# Alternative for theme packages
while read theme background; do
update-alternatives --remove \
desktop-login-background \
/usr/share/desktop-base/$theme-theme/login/$background
done << EOF
kali background.svg
EOF
# Remove GRUB alternatives
# Remove alternative for the GRUB background/colors config
while read theme priority; do
update-alternatives --remove \
desktop-grub.sh \
/usr/share/desktop-base/$theme-theme/grub/grub_background.sh
done << EOF
kali
EOF
# Remove background alternatives
while read theme ratio; do
update-alternatives --remove \
desktop-grub.sh \
/usr/share/desktop-base/$theme-theme/grub/grub_background.sh
update-alternatives --remove \
desktop-grub \
/usr/share/desktop-base/$theme-theme/grub/grub-$ratio.png
done << EOF
kali 4x3
kali 16x9
EOF
# Remove theme package alternatives
while read theme; do
update-alternatives --remove \
desktop-theme \
/usr/share/desktop-base/$theme-theme
done << EOF
kali
EOF
fi
# Tag to allow some debhelper commands to inject relevant code
#DEBHELPER#