Commit ac46ef8d authored by Joey Hess's avatar Joey Hess

- In fallback os-prober test, skip over symlinks, since they could point

      from root into /boot or result in confusing duplicate entries.
      Closes: #258624
    - Make the fallback os-prober really find kernels matched by globs.

r17708
parent cbab59d6
os-prober (0.13) UNRELEASED; urgency=low
os-prober (0.13) unstable; urgency=low
* Giuseppe Sacco
- Added preliminary test for Solaris/IA32. Closes: #255206
* Joey Hess
- Add support for fstabs with UUIDs or disk labels. Closes:#257794
- In fallback os-prober test, skip over symlinks, since they could point
from root into /boot or result in confusing duplicate entries.
Closes: #258624
- Make the fallback os-prober really find kernels matched by globs.
-- Joey Hess <joeyh@debian.org> Sat, 10 Jul 2004 14:32:17 -0400
......
......@@ -12,28 +12,31 @@ type="$4"
mappedpartition=$(mapdevfs "$partition" 2>/dev/null) || mappedpartition="$partition"
exitcode=1
for kernfile in /vmlinuz /vmlinux /boot/vmlinuz /boot/vmlinux /boot/vmlinuz* \
/boot/vmlinux* /vmlinuz* /vmlinux*; do
if echo "$kernfile" | grep -q boot/; then
for kernpat in /vmlinuz /vmlinux /boot/vmlinuz /boot/vmlinux "/boot/vmlinuz*" \
"/boot/vmlinux*" "/vmlinuz*" "/vmlinux*"; do
if echo "$kernpat" | grep -q boot/; then
kernbootpart=$bootpart
else
kernbootpart=$partition
fi
if [ -f "$mpoint$kernfile" ]; then
initrdname=$(echo "$kernfile" | sed "s/vmlinu[zx]/initrd\*/")
foundinitrd=0
for initrd in $(eval ls $mpoint$initrdname 2>/dev/null); do
if [ -f "$initrd" ]; then
initrd=$(echo "$initrd" | sed "s!^$mpoint!!")
result "$partition:$kernbootpart::$kernfile:$initrd:root=$mappedpartition"
for kernfile in $(eval ls $mpoint$kernpat 2>/dev/null); do
kernbasefile=$(echo "$kernfile" | sed "s!^$mpoint!!")
if [ -f "$kernfile" ] && [ ! -L "$kernfile" ]; then
initrdname=$(echo "$kernfile" | sed "s/vmlinu[zx]/initrd\*/")
foundinitrd=0
for initrd in $(eval ls $initrdname 2>/dev/null); do
if [ -f "$initrd" ] && [ ! -L "$initrd" ]; then
initrd=$(echo "$initrd" | sed "s!^$mpoint!!")
result "$partition:$kernbootpart::$kernbasefile:$initrd:root=$mappedpartition"
exitcode=0
foundinitrd=1
fi
done
if [ "$foundinitrd" = 0 ]; then
result "$partition:$kernbootpart::$kernbasefile::root=$mappedpartition"
exitcode=0
foundinitrd=1
fi
done
if [ "$foundinitrd" = 0 ]; then
result "$partition:$kernbootpart::$kernfile::root=$mappedpartition"
exitcode=0
fi
fi
done
done
exit $exitcode
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment