mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-23 14:41:31 +02:00
update_kernel: fix to be not rely on kernel command-line
This script recently stopped working when we changed the kernel cmdline. Fix to be more robust by using rootdev instead. BUG=12780 TEST=Updated my kernel. Change-Id: I033f670c5db821863441ea1546c382fce3436c01 Review URL: http://codereview.chromium.org/6628027
This commit is contained in:
parent
b54301bb9a
commit
e39579a9d0
@ -62,8 +62,12 @@ function learn_device() {
|
|||||||
# Ask the target what the kernel partition is
|
# Ask the target what the kernel partition is
|
||||||
function learn_partition() {
|
function learn_partition() {
|
||||||
[ -n "${FLAGS_partition}" ] && return
|
[ -n "${FLAGS_partition}" ] && return
|
||||||
remote_sh cat /proc/cmdline
|
! remote_sh rootdev
|
||||||
if echo "${REMOTE_OUT}" | egrep -q "${FLAGS_device}3"; then
|
if [ "${REMOTE_OUT}" == "/dev/dm-0" ]; then
|
||||||
|
remote_sh ls /sys/block/dm-0/slaves
|
||||||
|
REMOTE_OUT="/dev/${REMOTE_OUT}"
|
||||||
|
fi
|
||||||
|
if [ "${REMOTE_OUT}" == "${FLAGS_device}3" ]; then
|
||||||
FLAGS_partition="${FLAGS_device}2"
|
FLAGS_partition="${FLAGS_device}2"
|
||||||
else
|
else
|
||||||
FLAGS_partition="${FLAGS_device}4"
|
FLAGS_partition="${FLAGS_device}4"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user