Ubuntu Pastebin

Paste from ogra at Mon, 9 Jan 2017 10:31:55 +0000

Download as text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/sh -e
# initramfs local-premount script to set a
# mac address on the dragonboard

PREREQ=""

# Output pre-requisites
prereqs()
{
        echo "$PREREQ"
}

case "$1" in
    prereqs)
        prereqs
        exit 0
        ;;
esac

if [ -e /proc/device-tree/model ]; then
    if grep -q "APQ 8016" /proc/device-tree/model; then
        if grep -q androidboot.serialno /proc/cmdline; then
            for i in $(cat /proc/cmdline); do
                case "$i" in
                  androidboot.serialno=*)
                    echo "0200${i#androidboot.serialno=}"| \
                      sed 's/.\{2\}/&:/g;s/.$//' >/run/macaddr0
                  ;;
                esac
            done
        fi
    fi
fi
Download as text