~straemer/ubuntu/quantal/update-manager/fix-for-1058070

« back to all changes in this revision

Viewing changes to DistUpgrade/base-installer/kernel/kfreebsd-i386.sh

  • Committer: Package Import Robot
  • Author(s): Michael Terry
  • Date: 2012-06-29 10:59:30 UTC
  • mfrom: (389.1.2 precise-security)
  • Revision ID: package-import@ubuntu.com-20120629105930-0oaj9vdvykmvkjum
Tags: 1:0.165
* Implementation of "update on start" feature from spec
  https://wiki.ubuntu.com/SoftwareUpdates
* Use a single main window that changes instead of having modal dialogs
* Implement several special-purpose dialogs like "No updates" or
  "Dist upgrade needed" accordingn to the above spec
* Split out release upgrader code and DistUpgrade module into a separate
  source package
* Drop python-update-manager, as it is unused
* debian/tests:
  - Add dep8 tests

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
arch_get_kernel_flavour () {
2
 
        VENDOR=`grep '^vendor_id' "$CPUINFO" | head -n1 | cut -d: -f2`
3
 
        FAMILY=`grep '^cpu family' "$CPUINFO" | head -n1 | cut -d: -f2`
4
 
        MODEL=`grep '^model[[:space:]]*:' "$CPUINFO" | head -n1 | cut -d: -f2`
5
 
        NUMCPUS=`grep ^processor "$CPUINFO" | wc -l`
6
 
 
7
 
        # Only offer smp if the system supports has more than one cpu
8
 
        if test $NUMCPUS -gt "1" ; then
9
 
            SMP="-smp"
10
 
        fi
11
 
 
12
 
        case "$VENDOR" in
13
 
            " AuthenticAMD"*)
14
 
                case "$FAMILY" in
15
 
                    " 15"|" 16"|" 17"|" 18"|" 20")      # k8
16
 
                        echo 686$SMP
17
 
                        ;;
18
 
                    " 6")                               # k7
19
 
                        case "$MODEL" in
20
 
                            " 0"|" 1"|" 2"|" 3"|" 4"|" 5")
21
 
                                # May not have SSE support
22
 
                                echo 486 ;;
23
 
                            *)  echo 686$SMP ;;
24
 
                        esac
25
 
                        ;;
26
 
                    *)          echo 486 ;;
27
 
                esac
28
 
                ;;
29
 
            " GenuineIntel")
30
 
                case "$FAMILY" in
31
 
                    " 6"|" 15") echo 686$SMP ;;
32
 
                    *)          echo 486 ;;
33
 
                esac
34
 
                ;;
35
 
            " CentaurHauls")
36
 
                case "$FAMILY" in
37
 
                    " 6")
38
 
                        case "$MODEL" in
39
 
                            " 9"|" 10") echo 686$SMP ;;
40
 
                            *)          echo 486 ;;
41
 
                        esac
42
 
                        ;;
43
 
                    *)
44
 
                        echo 486 ;;
45
 
                esac
46
 
                ;;
47
 
            *)
48
 
                echo 486 ;;
49
 
        esac
50
 
        return 0
51
 
}
52
 
 
53
 
arch_check_usable_kernel () {
54
 
        if echo "$1" | grep -Eq -- "-486(-.*)?$"; then return 0; fi
55
 
        if [ "$2" = 486 ]; then return 1; fi
56
 
        if echo "$1" | grep -Eq -- "-686(-.*)?$"; then return 0; fi
57
 
        if [ "$2" = 686 ] || [ "$2" = 686-smp ]; then return 1; fi
58
 
 
59
 
        # default to usable in case of strangeness
60
 
        warning "Unknown kernel usability: $1 / $2"
61
 
        return 0
62
 
}
63
 
 
64
 
arch_get_kernel () {
65
 
        if [ "$1" = 686-smp ]; then
66
 
                echo "kfreebsd-image-$KERNEL_MAJOR-686-smp"
67
 
        fi
68
 
        if [ "$1" = 686 ]; then
69
 
                echo "kfreebsd-image-$KERNEL_MAJOR-686"
70
 
        fi
71
 
        echo "kfreebsd-image-$KERNEL_MAJOR-486"
72
 
}