Revert broken patch adding support for BSD distributions. Closes: #668860
authorJoey Hess <joey@kitenet.net>
Fri, 20 Apr 2012 14:50:32 +0000 (10:50 -0400)
committerJoey Hess <joey@kitenet.net>
Fri, 20 Apr 2012 14:50:32 +0000 (10:50 -0400)
Note that this reverts some fixes Colin made to the files distributed
in #668860, which should be kept if anyone resuscitates this patch again.

debian/changelog
os-probes/common/50mounted-tests
os-probes/mounted/common/90bsd-distro [deleted file]

index 19f26de..7c12769 100644 (file)
@@ -6,6 +6,9 @@ os-prober (1.52) UNRELEASED; urgency=low
   [ Colin Watson ]
   * Install README and TODO in the .deb.
 
+  [ Joey Hess ]
+  * Revert broken patch adding support for BSD distributions. Closes: #668860
+
  -- Colin Watson <cjwatson@debian.org>  Thu, 05 Apr 2012 09:23:59 +0100
 
 os-prober (1.51) unstable; urgency=low
@@ -33,7 +36,7 @@ os-prober (1.50) unstable; urgency=low
 
   [ Otavio Salvador ]
   * Add support to detect BSD systems. Thanks to Gavrilin Andrey
-    <gaal.dev@gmail.com> for the patch (refs: #659208).
+    for the patch (refs: #659208).
 
   [ Joey Hess ]
   * Avoid false positives in MS-DOS detection by also looking for
index 255540d..45b4b53 100755 (executable)
@@ -60,20 +60,9 @@ if type grub-mount >/dev/null 2>&1 && \
 else
        ro_partition "$partition"
        for type in $types $delaytypes; do
-               if [ "$type" = ufs ]; then
-                       for ufstype in ufs2 44bsd; do
-                               if mount -o ro,ufstype=$ufstype -t "$type" "$partition" "$tmpmnt" 2>/dev/null; then
-                                       mounted=1
-                               fi
-                       done
-               else
-                       if mount -o ro -t "$type" "$partition" "$tmpmnt" 2>/dev/null; then
-                               mounted=1
-                       fi
-               fi
-
-               if [ "$mounted" ]; then
+               if mount -o ro -t "$type" "$partition" "$tmpmnt" 2>/dev/null; then
                        debug "mounted as $type filesystem"
+                       mounted=1
                        break
                fi
        done
diff --git a/os-probes/mounted/common/90bsd-distro b/os-probes/mounted/common/90bsd-distro
deleted file mode 100755 (executable)
index ddeeec7..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-#!/bin/sh
-# Test for *BSD distributions.
-set -e
-
-. /usr/share/os-prober/common.sh
-
-partition="$1"
-dir="$2"
-type="$3"
-
-# Weed out stuff that doesn't apply to us
-case "$type" in
-  ufs|ufs1|ufs2) ;;
-  *) exit 1 ;;
-esac
-
-disk=$(echo $partition | gawk '{ match($0, /([[:alpha:][:punct:]]+)[[:digit:]]+/, disk); print disk[1] }')
-
-if [ ! -z "$disk" ]; then
-  tpartition=$(echo $partition | sed 's|\/|\\/|g')
-
-  system=$(fdisk -l $disk | awk '/'$tpartition'[[:blank:]]+\*[[:blank:]]+.+[[:blank:]]+.+BSD/ {print $7}')
-
-  if [ ! -z "$system" ]; then
-    title=
-
-    if [ -f $dir/etc/motd ]; then
-      case $system in
-      FreeBSD | NetBSD | OpenBSD) title=$(cat $dir/etc/motd | gawk '{ match($0, /('$system')[[:blank:]]+([[:graph:]]+)[[:blank:]]+(\([[:print:]]+\))/, title); print title[1], title[2], title[3]; exit 0}')
-                                 ;;
-      esac
-    fi
-
-    if [ -z "$title" ]; then
-      title="$system"
-    fi
-
-    label="$(count_next_label "$system")"
-    echo "$partition:$title:$label:chain"
-
-    exit 0
-  else
-    exit 1
-  fi
-else
-  exit 1
-fi