Fix desktop-base maintainer scripts

This commit is contained in:
Daniel Ruiz de Alegría
2020-03-20 00:35:44 +01:00
parent fc4f7c26e2
commit 380c35c31d
3 changed files with 25 additions and 4 deletions
+21
View File
@@ -154,6 +154,27 @@ EOF
update-alternatives --remove \
desktop-grub \
/usr/share/desktop-base/kali-theme/grub/grub-16x9.png
elif dpkg --compare-versions "$2" lt-nl "2020.2.1"; then
# Remove desktop background alternatives
update-alternatives --remove \
desktop-background \
/usr/share/backgrounds/kali/kali-logo-16x9.png
# Remove XML version of the background alternatives
update-alternatives --remove \
desktop-background.xml \
/usr/share/backgrounds/kali/kali-logo.xml
# Remove login background alternatives
update-alternatives --remove \
desktop-login-background \
/usr/share/backgrounds/kali/kali-light.svg
# Remove XML version of the login background alternatives
update-alternatives --remove \
desktop-lockscreen.xml \
/usr/share/backgrounds/kali/kali-light.xml
fi
fi
+4 -4
View File
@@ -10,17 +10,17 @@ if [ "$1" = "remove" ]; then
# Remove background alternatives for theme packages
update-alternatives --remove \
desktop-background \
/usr/share/backgrounds/kali/kali-logo-16x9.png
/usr/share/wallpapers/KaliLogo/contents/images/kali-logo-16x9.png
# Remove desktop-background.xml alternatives
update-alternatives --remove \
desktop-background.xml \
/usr/share/backgrounds/kali/kali-logo.xml
/usr/share/wallpapers/KaliLogo/gnome-background.xml
# Remove desktop-lockscreen.xml alternatives
update-alternatives --remove \
desktop-lockscreen.xml \
/usr/share/backgrounds/kali/kali-light.xml
/usr/share/wallpapers/KaliLight/gnome-background.xml
# Remove Plasma 5/KDE wallpaper alternatives
update-alternatives --remove \
@@ -30,7 +30,7 @@ if [ "$1" = "remove" ]; then
# Remove login theme alternatives
update-alternatives --remove \
desktop-login-background \
/usr/share/backgrounds/kali/kali-light.svg
/usr/share/wallpapers/KaliLight/contents/kali-light.svg
# Remove GRUB alternatives
update-alternatives --remove \
+15
View File
@@ -0,0 +1,15 @@
#!/bin/sh
update_script() {
local script=$1
(
sed -n -e '1,/^FILES_TO_DIVERT="/ p' $script
cat files-to-divert
sed -n -e '/^" # END FILES_TO_DIVERT/,$ p' $script
) > $script.new
mv $script.new $script
}
update_script debian/kali-themes.preinst
update_script debian/kali-themes.postinst
update_script debian/kali-themes.postrm