~ubuntu-branches/ubuntu/precise/base-installer/precise-proposed

« back to all changes in this revision

Viewing changes to kernel/amd64.sh

  • Committer: Package Import Robot
  • Author(s): Colin Watson
  • Date: 2012-11-07 10:48:05 UTC
  • Revision ID: package-import@ubuntu.com-20121107104805-b38tk0ihj6lblqg6
Tags: 1.122ubuntu7.2
On amd64/efi, install a signed kernel if the SecureBoot variable is set
(LP: #1075181).

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
        return 1
18
18
}
19
19
 
 
20
secure_boot_enabled () {
 
21
        local efi_vars sb_var
 
22
        efi_vars=/sys/firmware/efi/vars
 
23
        sb_var="$efi_vars/SecureBoot-8be4df61-93ca-11d2-aa0d-00e098032b8c/data"
 
24
        if [ "$SUBARCH" = efi ] && [ -e "$sb_var" ] && \
 
25
           [ "$(printf %x \'"$(cat "$sb_var")")" = 1 ]; then
 
26
                return 0
 
27
        else
 
28
                return 1
 
29
        fi
 
30
}
 
31
 
20
32
arch_get_kernel () {
 
33
        if secure_boot_enabled; then
 
34
                echo "linux-signed-generic"
 
35
                echo "linux-signed-image-generic"
 
36
        fi
 
37
 
21
38
        echo "linux-generic"
22
39
        echo "linux-image-generic"
23
40