chiark / gitweb /
better config file handling
[xfonts-traditional] / debian / xfonts-traditional.prerm
index 35f8edadcb22d4731f3bfee54e65dab0401322e0..53687d7984c0298e28e44382e5c25348d3abb65e 100755 (executable)
@@ -5,7 +5,7 @@ set -e
 
 #DEBHELPER#
 
-aliasfile=/etc/X11/fonts/misc/xfonts-base.alias
+/usr/share/xfonts-traditional/checkfiles prerm "$@"
 
 case "$1" in
 
@@ -13,17 +13,18 @@ remove)
 
        echo 'Checking that "fixed" is not from xfonts-traditional...'
 
-       if grep '^fixed[         ][      ]*-trad-' $aliasfile \
-           /usr/share/fonts/X11/misc/fonts.alias; then
+       if grep '^fixed[         ][      ]*-trad-' \
+                       /etc/X11/fonts/misc/xfonts-base.alias \
+                       /usr/share/fonts/X11/misc/fonts.alias; then
                cat >&2 <<'END'
 
 Removing xfonts-traditional would break your X server by removing "fixed".
 
 You should not remove xfonts-traditional while "fixed" refers to one
-of its fonts.  You probably want to check the differences between
-/etc/X11/fonts/misc/xfonts-base.alias and xfonts-base.alias.not-trad,
-reconcile any changes, and then run "update-fonts-alias misc".
-After that you can retry the removal.
+of its fonts.  You probably want to check the differences between the
+various /etc/X11/fonts/misc/xfonts-base.alias*, reconcile any changes,
+and then run "update-fonts-alias misc".  After that you can retry the
+removal.
 
 END
                printf 'Continue anyway ? [n/y] '