* util/update-grub_lib.in (grub_file_is_not_garbage): New function.
Determines if a file is garbage left by packaging systems, etc.
* util/update-grub.in: Use grub_file_is_not_garbage() as a condition
for processing /etc/grub.d scripts.
* util/grub.d/10_hurd.in: Fix `GRUB_DISTRIBUTOR' comparison.
* util/grub.d/10_linux.in: Likewise. Use grub_file_is_not_garbage()
as a condition for processing Linux images.
+2008-01-10 Robert Millan <rmh@aybabtu.com>
+
+ * util/update-grub_lib.in (grub_file_is_not_garbage): New function.
+ Determines if a file is garbage left by packaging systems, etc.
+ * util/update-grub.in: Use grub_file_is_not_garbage() as a condition
+ for processing /etc/grub.d scripts.
+ * util/grub.d/10_hurd.in: Fix `GRUB_DISTRIBUTOR' comparison.
+ * util/grub.d/10_linux.in: Likewise. Use grub_file_is_not_garbage()
+ as a condition for processing Linux images.
+
2008-01-10 Pavel Roskin <proski@gnu.org>
* include/grub/powerpc/libgcc.h (__ucmpdi2): New export. Needed
#! /bin/sh -e
# update-grub helper script.
-# Copyright (C) 2006,2007 Free Software Foundation, Inc.
+# Copyright (C) 2006,2007,2008 Free Software Foundation, Inc.
#
# GRUB is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# You should have received a copy of the GNU General Public License
# along with GRUB. If not, see <http://www.gnu.org/licenses/>.
-if [ "x${GRUB_DISTRIBUTOR}" = "" ] ; then
+if [ "x${GRUB_DISTRIBUTOR}" = "x" ] ; then
OS=GNU
else
OS="${GRUB_DISTRIBUTOR} GNU/Hurd"
#! /bin/sh -e
# update-grub helper script.
-# Copyright (C) 2006,2007 Free Software Foundation, Inc.
+# Copyright (C) 2006,2007,2008 Free Software Foundation, Inc.
#
# GRUB is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# You should have received a copy of the GNU General Public License
# along with GRUB. If not, see <http://www.gnu.org/licenses/>.
-if [ "x${GRUB_DISTRIBUTOR}" = "" ] ; then
+libdir=@libdir@
+. ${libdir}/grub/update-grub_lib
+
+if [ "x${GRUB_DISTRIBUTOR}" = "x" ] ; then
OS=GNU/Linux
else
OS="${GRUB_DISTRIBUTOR} GNU/Linux"
}
list=`for i in /boot/vmlinu[xz]-* /vmlinu[xz]-* ; do
- if test -e $i ; then echo -n "$i " ; fi
+ if grub_file_is_not_garbage "$i" ; then echo -n "$i " ; fi
done`
while [ "x$list" != "x" ] ; do
#! /bin/sh -e
# Generate grub.cfg by inspecting /boot contents.
-# Copyright (C) 2006,2007 Free Software Foundation, Inc.
+# Copyright (C) 2006,2007,2008 Free Software Foundation, Inc.
#
# GRUB is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# emacsen backup files. FIXME: support other editors
*~) ;;
*)
- if test -f "$i" && test -x "$i" ; then
+ if grub_file_is_not_garbage "$i" && test -x "$i" ; then
echo
echo "### BEGIN $i ###"
"$i"
return 1
}
+
+grub_file_is_not_garbage ()
+{
+ if test -f "$1" ; then
+ case "$1" in
+ *.dpkg-dist|*.dpkg-old|*.dpkg-tmp) return 1 ;; # debian dpkg
+ esac
+ else
+ return 1
+ fi
+ return 0
+}