Mandeep Singh Baines | a63cd2d | 2010-12-02 11:58:26 -0800 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
Taylor Hutt | 60da642 | 2011-06-02 13:54:43 -0700 | [diff] [blame] | 3 | # Copyright (c) 2009-2011 The Chromium OS Authors. All rights reserved. |
Mandeep Singh Baines | a63cd2d | 2010-12-02 11:58:26 -0800 | [diff] [blame] | 4 | # Use of this source code is governed by a BSD-style license that can be |
| 5 | # found in the LICENSE file. |
| 6 | |
| 7 | # Script to update the kernel on a live running ChromiumOS instance. |
| 8 | |
Brian Harring | aa13ea4 | 2012-03-15 18:31:03 -0700 | [diff] [blame] | 9 | SCRIPT_ROOT=$(dirname $(readlink -f "$0")) |
David James | 359d3e1 | 2012-07-10 13:09:48 -0700 | [diff] [blame] | 10 | . "${SCRIPT_ROOT}/common.sh" || exit 1 |
| 11 | . "${SCRIPT_ROOT}/remote_access.sh" || exit 1 |
Steven 'Steve' Kendall | 019f38f | 2016-06-09 12:43:28 -0400 | [diff] [blame^] | 12 | # This file is sourced for partition constants. |
| 13 | . "${BUILD_LIBRARY_DIR}/disk_layout_util.sh" || exit 1 |
Mandeep Singh Baines | a63cd2d | 2010-12-02 11:58:26 -0800 | [diff] [blame] | 14 | |
Mandeep Singh Baines | 2f3b5fc | 2011-01-14 14:20:12 -0800 | [diff] [blame] | 15 | # Script must be run inside the chroot. |
Greg Spencer | 798d75f | 2011-02-01 22:04:49 -0800 | [diff] [blame] | 16 | restart_in_chroot_if_needed "$@" |
Mandeep Singh Baines | 2f3b5fc | 2011-01-14 14:20:12 -0800 | [diff] [blame] | 17 | |
Mandeep Singh Baines | a63cd2d | 2010-12-02 11:58:26 -0800 | [diff] [blame] | 18 | DEFINE_string board "" "Override board reported by target" |
Olof Johansson | f53fa0d | 2011-01-26 13:06:46 -0800 | [diff] [blame] | 19 | DEFINE_string device "" "Override boot device reported by target" |
Mandeep Singh Baines | a63cd2d | 2010-12-02 11:58:26 -0800 | [diff] [blame] | 20 | DEFINE_string partition "" "Override kernel partition reported by target" |
Doug Anderson | fcaed8a | 2014-07-09 11:34:29 -0700 | [diff] [blame] | 21 | DEFINE_string rootoff "" "Override root offset" |
Olof Johansson | f53fa0d | 2011-01-26 13:06:46 -0800 | [diff] [blame] | 22 | DEFINE_string arch "" "Override architecture reported by target" |
Olof Johansson | 8488f5a | 2011-04-20 17:27:37 -0700 | [diff] [blame] | 23 | DEFINE_boolean reboot $FLAGS_TRUE "Reboot system after update" |
Doug Anderson | 5a21b44 | 2012-12-07 11:47:31 -0800 | [diff] [blame] | 24 | DEFINE_boolean vboot $FLAGS_TRUE "Update the vboot kernel" |
Olof Johansson | 68cbfaf | 2013-04-23 14:06:28 -0700 | [diff] [blame] | 25 | DEFINE_boolean syslinux $FLAGS_TRUE "Update the syslinux kernel" |
Olof Johansson | 45225c9 | 2013-10-15 17:32:48 -0700 | [diff] [blame] | 26 | DEFINE_boolean bootonce $FLAGS_FALSE "Mark kernel partition as boot once" |
Olof Johansson | 4a7b288 | 2013-10-16 11:59:58 -0700 | [diff] [blame] | 27 | DEFINE_boolean remote_bootargs $FLAGS_FALSE "Use bootargs from running kernel on target" |
Mandeep Singh Baines | a63cd2d | 2010-12-02 11:58:26 -0800 | [diff] [blame] | 28 | |
Doug Anderson | 549f3b5 | 2013-09-26 14:46:18 -0700 | [diff] [blame] | 29 | ORIG_ARGS=("$@") |
| 30 | |
Mandeep Singh Baines | 2f3b5fc | 2011-01-14 14:20:12 -0800 | [diff] [blame] | 31 | # Parse command line. |
| 32 | FLAGS "$@" || exit 1 |
| 33 | eval set -- "${FLAGS_ARGV}" |
| 34 | |
| 35 | # Only now can we die on error. shflags functions leak non-zero error codes, |
Brian Harring | 7f175a5 | 2012-03-02 05:37:00 -0800 | [diff] [blame] | 36 | # so will die prematurely if 'switch_to_strict_mode' is specified before now. |
| 37 | switch_to_strict_mode |
Mandeep Singh Baines | 2f3b5fc | 2011-01-14 14:20:12 -0800 | [diff] [blame] | 38 | |
Mike Frysinger | 6b1abb2 | 2012-05-11 13:44:06 -0400 | [diff] [blame] | 39 | cleanup() { |
Mandeep Singh Baines | a63cd2d | 2010-12-02 11:58:26 -0800 | [diff] [blame] | 40 | cleanup_remote_access |
| 41 | rm -rf "${TMP}" |
| 42 | } |
| 43 | |
Mike Frysinger | 6b1abb2 | 2012-05-11 13:44:06 -0400 | [diff] [blame] | 44 | learn_device() { |
Olof Johansson | f53fa0d | 2011-01-26 13:06:46 -0800 | [diff] [blame] | 45 | [ -n "${FLAGS_device}" ] && return |
| 46 | remote_sh df /mnt/stateful_partition |
| 47 | FLAGS_device=$(echo "${REMOTE_OUT}" | awk '/dev/ {print $1}' | sed s/1\$//) |
| 48 | info "Target reports root device is ${FLAGS_device}" |
| 49 | } |
| 50 | |
Mandeep Singh Baines | a63cd2d | 2010-12-02 11:58:26 -0800 | [diff] [blame] | 51 | # Ask the target what the kernel partition is |
Mike Frysinger | 6b1abb2 | 2012-05-11 13:44:06 -0400 | [diff] [blame] | 52 | learn_partition_and_ro() { |
Mandeep Singh Baines | e39579a | 2011-03-04 15:58:57 -0800 | [diff] [blame] | 53 | ! remote_sh rootdev |
Paul Taysom | a64d9db | 2012-09-21 13:30:43 -0700 | [diff] [blame] | 54 | if [ "${REMOTE_OUT%%-*}" == "/dev/dm" ]; then |
| 55 | remote_sh rootdev -s |
Olof Johansson | 8488f5a | 2011-04-20 17:27:37 -0700 | [diff] [blame] | 56 | REMOTE_VERITY=${FLAGS_TRUE} |
Doug Anderson | 2023fb8 | 2013-02-13 11:53:55 -0800 | [diff] [blame] | 57 | warn "System is using verity: not updating firmware/modules" |
Olof Johansson | 8488f5a | 2011-04-20 17:27:37 -0700 | [diff] [blame] | 58 | else |
| 59 | REMOTE_VERITY=${FLAGS_FALSE} |
| 60 | info "System is not using verity: updating firmware and modules" |
Mandeep Singh Baines | e39579a | 2011-03-04 15:58:57 -0800 | [diff] [blame] | 61 | fi |
Olof Johansson | 4996bfb | 2013-11-13 12:58:52 -0800 | [diff] [blame] | 62 | [ -n "${FLAGS_partition}" ] && return |
Steven 'Steve' Kendall | 019f38f | 2016-06-09 12:43:28 -0400 | [diff] [blame^] | 63 | if [ "${REMOTE_OUT}" == "${FLAGS_device}${PARTITION_NUM_ROOT_A}" ]; then |
| 64 | FLAGS_partition="${FLAGS_device}${PARTITION_NUM_KERN_A}" |
Mandeep Singh Baines | a63cd2d | 2010-12-02 11:58:26 -0800 | [diff] [blame] | 65 | else |
Steven 'Steve' Kendall | 019f38f | 2016-06-09 12:43:28 -0400 | [diff] [blame^] | 66 | FLAGS_partition="${FLAGS_device}${PARTITION_NUM_KERN_B}" |
Mandeep Singh Baines | a63cd2d | 2010-12-02 11:58:26 -0800 | [diff] [blame] | 67 | fi |
| 68 | if [ -z "${FLAGS_partition}" ]; then |
Doug Anderson | b2fe465 | 2012-12-07 17:33:56 -0800 | [diff] [blame] | 69 | die "Partition required" |
Mandeep Singh Baines | a63cd2d | 2010-12-02 11:58:26 -0800 | [diff] [blame] | 70 | fi |
Doug Anderson | 5a21b44 | 2012-12-07 11:47:31 -0800 | [diff] [blame] | 71 | if [ ${REMOTE_VERITY} -eq ${FLAGS_TRUE} ]; then |
| 72 | info "Target reports kernel partition is ${FLAGS_partition}" |
| 73 | if [ ${FLAGS_vboot} -eq ${FLAGS_FALSE} ]; then |
| 74 | die "Must update vboot when target is using verity" |
| 75 | fi |
| 76 | fi |
Mandeep Singh Baines | a63cd2d | 2010-12-02 11:58:26 -0800 | [diff] [blame] | 77 | } |
| 78 | |
Olof Johansson | 4a7b288 | 2013-10-16 11:59:58 -0700 | [diff] [blame] | 79 | get_bootargs() { |
| 80 | if [ ${FLAGS_remote_bootargs} -eq ${FLAGS_TRUE} ] ; then |
| 81 | info "Using remote bootargs" |
| 82 | remote_sh cat /proc/cmdline && echo "${REMOTE_OUT}" |
| 83 | else |
Doug Anderson | fcaed8a | 2014-07-09 11:34:29 -0700 | [diff] [blame] | 84 | if [ -n "${FLAGS_rootoff}" ]; then |
| 85 | sed "s/PARTNROFF=1/PARTNROFF=${FLAGS_rootoff}/" \ |
| 86 | "${SRC_ROOT}/build/images/${FLAGS_board}/latest/config.txt" |
| 87 | else |
| 88 | cat "${SRC_ROOT}/build/images/${FLAGS_board}/latest/config.txt" |
| 89 | fi |
Olof Johansson | 4a7b288 | 2013-10-16 11:59:58 -0700 | [diff] [blame] | 90 | fi |
| 91 | } |
| 92 | |
Mike Frysinger | 6b1abb2 | 2012-05-11 13:44:06 -0400 | [diff] [blame] | 93 | make_kernelimage() { |
Tom Wai-Hong Tam | 6b50a07 | 2011-05-25 17:00:15 +0800 | [diff] [blame] | 94 | local bootloader_path |
| 95 | local kernel_image |
Olof Johansson | 4a7b288 | 2013-10-16 11:59:58 -0700 | [diff] [blame] | 96 | local config_path="$(mktemp /tmp/config.txt.XXXXX)" |
Olof Johansson | f53fa0d | 2011-01-26 13:06:46 -0800 | [diff] [blame] | 97 | if [[ "${FLAGS_arch}" == "arm" ]]; then |
Taylor Hutt | 60da642 | 2011-06-02 13:54:43 -0700 | [diff] [blame] | 98 | name="bootloader.bin" |
| 99 | bootloader_path="${SRC_ROOT}/build/images/${FLAGS_board}/latest/${name}" |
Tom Wai-Hong Tam | 6b50a07 | 2011-05-25 17:00:15 +0800 | [diff] [blame] | 100 | kernel_image="/build/${FLAGS_board}/boot/vmlinux.uimg" |
Olof Johansson | f53fa0d | 2011-01-26 13:06:46 -0800 | [diff] [blame] | 101 | else |
Tom Wai-Hong Tam | 6b50a07 | 2011-05-25 17:00:15 +0800 | [diff] [blame] | 102 | bootloader_path="/lib64/bootstub/bootstub.efi" |
| 103 | kernel_image="/build/${FLAGS_board}/boot/vmlinuz" |
| 104 | fi |
Olof Johansson | 4a7b288 | 2013-10-16 11:59:58 -0700 | [diff] [blame] | 105 | get_bootargs > "${config_path}" |
Kees Cook | 43a3213 | 2011-10-18 13:17:11 -0700 | [diff] [blame] | 106 | vbutil_kernel --pack $TMP/new_kern.bin \ |
Olof Johansson | f53fa0d | 2011-01-26 13:06:46 -0800 | [diff] [blame] | 107 | --keyblock /usr/share/vboot/devkeys/kernel.keyblock \ |
| 108 | --signprivate /usr/share/vboot/devkeys/kernel_data_key.vbprivk \ |
| 109 | --version 1 \ |
Olof Johansson | 4a7b288 | 2013-10-16 11:59:58 -0700 | [diff] [blame] | 110 | --config ${config_path} \ |
Tom Wai-Hong Tam | 6b50a07 | 2011-05-25 17:00:15 +0800 | [diff] [blame] | 111 | --bootloader "${bootloader_path}" \ |
| 112 | --vmlinuz "${kernel_image}" \ |
| 113 | --arch "${FLAGS_arch}" |
Olof Johansson | 4a7b288 | 2013-10-16 11:59:58 -0700 | [diff] [blame] | 114 | rm "${config_path}" |
Olof Johansson | f53fa0d | 2011-01-26 13:06:46 -0800 | [diff] [blame] | 115 | } |
| 116 | |
Mike Frysinger | 6b1abb2 | 2012-05-11 13:44:06 -0400 | [diff] [blame] | 117 | copy_kernelimage() { |
Doug Anderson | adf8a00 | 2012-12-17 11:40:34 -0800 | [diff] [blame] | 118 | remote_sh dd of="${FLAGS_partition}" bs=4K < "${TMP}/new_kern.bin" |
Olof Johansson | 8488f5a | 2011-04-20 17:27:37 -0700 | [diff] [blame] | 119 | } |
| 120 | |
Jonathan Kliegman | 775bc8e | 2012-08-14 12:30:49 -0400 | [diff] [blame] | 121 | check_kernelbuildtime() { |
| 122 | local version=$(readlink "/build/${FLAGS_board}/boot/vmlinuz" | cut -d- -f2-) |
| 123 | local build_dir="/build/${FLAGS_board}/lib/modules/${version}/build" |
| 124 | if [ "${build_dir}/Makefile" -nt "/build/${FLAGS_board}/boot/vmlinuz" ]; then |
| 125 | warn "Your build directory has been built more recently than" |
| 126 | warn "the installed kernel being updated to. Did you forget to" |
| 127 | warn "run 'cros_workon_make chromeos-kernel --install'?" |
| 128 | fi |
| 129 | } |
| 130 | |
Olof Johansson | 45225c9 | 2013-10-15 17:32:48 -0700 | [diff] [blame] | 131 | mark_boot_once() { |
| 132 | local idx=${FLAGS_partition##*[^0-9]} |
Chirantan Ekbote | f25b440 | 2014-05-06 12:42:18 -0700 | [diff] [blame] | 133 | remote_sh cgpt add -i ${idx} -S 0 -T 1 -P 15 ${FLAGS_device%p} |
Olof Johansson | 45225c9 | 2013-10-15 17:32:48 -0700 | [diff] [blame] | 134 | } |
| 135 | |
Olof Johansson | 68cbfaf | 2013-04-23 14:06:28 -0700 | [diff] [blame] | 136 | update_syslinux_kernel() { |
| 137 | # ARM does not have the syslinux directory, so skip it when the |
| 138 | # partition or the syslinux vmlinuz target is missing. |
| 139 | echo "updating syslinux kernel" |
Steven 'Steve' Kendall | 019f38f | 2016-06-09 12:43:28 -0400 | [diff] [blame^] | 140 | remote_sh grep $(echo ${FLAGS_device}${PARTITION_NUM_EFI_SYSTEM} | cut -d/ -f3) /proc/partitions |
Olof Johansson | 68cbfaf | 2013-04-23 14:06:28 -0700 | [diff] [blame] | 141 | if [ $(echo "$REMOTE_OUT" | wc -l) -eq 1 ]; then |
Steven 'Steve' Kendall | 019f38f | 2016-06-09 12:43:28 -0400 | [diff] [blame^] | 142 | remote_sh mkdir -p /tmp/${PARTITION_NUM_EFI_SYSTEM} |
| 143 | remote_sh mount ${FLAGS_device}${PARTITION_NUM_EFI_SYSTEM} /tmp/${PARTITION_NUM_EFI_SYSTEM} |
Olof Johansson | 68cbfaf | 2013-04-23 14:06:28 -0700 | [diff] [blame] | 144 | |
Steven 'Steve' Kendall | 019f38f | 2016-06-09 12:43:28 -0400 | [diff] [blame^] | 145 | if [ "$FLAGS_partition" = "${FLAGS_device}${PARTITION_NUM_KERN_A}" ]; then |
| 146 | target="/tmp/${PARTITION_NUM_EFI_SYSTEM}/syslinux/vmlinuz.A" |
Olof Johansson | 68cbfaf | 2013-04-23 14:06:28 -0700 | [diff] [blame] | 147 | else |
Steven 'Steve' Kendall | 019f38f | 2016-06-09 12:43:28 -0400 | [diff] [blame^] | 148 | target="/tmp/${PARTITION_NUM_EFI_SYSTEM}/syslinux/vmlinuz.B" |
Olof Johansson | 68cbfaf | 2013-04-23 14:06:28 -0700 | [diff] [blame] | 149 | fi |
| 150 | remote_sh "test ! -f $target || cp /boot/vmlinuz $target" |
| 151 | |
Steven 'Steve' Kendall | 019f38f | 2016-06-09 12:43:28 -0400 | [diff] [blame^] | 152 | remote_sh umount /tmp/${PARTITION_NUM_EFI_SYSTEM} |
| 153 | remote_sh rmdir /tmp/${PARTITION_NUM_EFI_SYSTEM} |
Olof Johansson | 68cbfaf | 2013-04-23 14:06:28 -0700 | [diff] [blame] | 154 | fi |
| 155 | } |
| 156 | |
Doug Anderson | 549f3b5 | 2013-09-26 14:46:18 -0700 | [diff] [blame] | 157 | multi_main() { |
| 158 | local host |
| 159 | |
| 160 | IFS="," |
| 161 | for host in ${FLAGS_remote}; do |
| 162 | "$0" "${ORIG_ARGS[@]}" --remote="${host}" \ |
| 163 | |& sed "s/^/${V_BOLD_YELLOW}${host}: ${V_VIDOFF}/" & |
| 164 | done |
| 165 | wait |
| 166 | } |
| 167 | |
Mike Frysinger | 6b1abb2 | 2012-05-11 13:44:06 -0400 | [diff] [blame] | 168 | main() { |
Doug Anderson | 549f3b5 | 2013-09-26 14:46:18 -0700 | [diff] [blame] | 169 | # If there are commas in the --remote, run the script in parallel. |
| 170 | if [[ ${FLAGS_remote} == *,* ]]; then |
| 171 | multi_main |
| 172 | return $? |
| 173 | fi |
| 174 | |
Mandeep Singh Baines | a63cd2d | 2010-12-02 11:58:26 -0800 | [diff] [blame] | 175 | trap cleanup EXIT |
| 176 | |
Kees Cook | 43a3213 | 2011-10-18 13:17:11 -0700 | [diff] [blame] | 177 | TMP=$(mktemp -d /tmp/update_kernel.XXXXXX) |
Mandeep Singh Baines | a63cd2d | 2010-12-02 11:58:26 -0800 | [diff] [blame] | 178 | |
| 179 | remote_access_init |
| 180 | |
Olof Johansson | f53fa0d | 2011-01-26 13:06:46 -0800 | [diff] [blame] | 181 | learn_arch |
| 182 | |
Mandeep Singh Baines | a63cd2d | 2010-12-02 11:58:26 -0800 | [diff] [blame] | 183 | learn_board |
| 184 | |
Olof Johansson | f53fa0d | 2011-01-26 13:06:46 -0800 | [diff] [blame] | 185 | learn_device |
| 186 | |
Olof Johansson | 8488f5a | 2011-04-20 17:27:37 -0700 | [diff] [blame] | 187 | learn_partition_and_ro |
Olof Johansson | f53fa0d | 2011-01-26 13:06:46 -0800 | [diff] [blame] | 188 | |
Mandeep Singh Baines | a63cd2d | 2010-12-02 11:58:26 -0800 | [diff] [blame] | 189 | remote_sh uname -r -v |
| 190 | |
| 191 | old_kernel="${REMOTE_OUT}" |
| 192 | |
Jonathan Kliegman | 775bc8e | 2012-08-14 12:30:49 -0400 | [diff] [blame] | 193 | check_kernelbuildtime |
| 194 | |
Doug Anderson | 5a21b44 | 2012-12-07 11:47:31 -0800 | [diff] [blame] | 195 | if [ ${FLAGS_vboot} -eq ${FLAGS_TRUE} ]; then |
| 196 | make_kernelimage |
| 197 | fi |
Mandeep Singh Baines | a63cd2d | 2010-12-02 11:58:26 -0800 | [diff] [blame] | 198 | |
Olof Johansson | 8488f5a | 2011-04-20 17:27:37 -0700 | [diff] [blame] | 199 | if [[ ${REMOTE_VERITY} -eq ${FLAGS_FALSE} ]]; then |
Olof Johansson | 8488f5a | 2011-04-20 17:27:37 -0700 | [diff] [blame] | 200 | remote_sh mount -o remount,rw / |
Kees Cook | 7d7d2ef | 2011-10-18 13:12:12 -0700 | [diff] [blame] | 201 | echo "copying kernel" |
Doug Anderson | 48b5200 | 2012-12-07 12:40:07 -0800 | [diff] [blame] | 202 | remote_send_to /build/"${FLAGS_board}"/boot/ /boot/ |
Kees Cook | 7d7d2ef | 2011-10-18 13:12:12 -0700 | [diff] [blame] | 203 | |
Olof Johansson | 68cbfaf | 2013-04-23 14:06:28 -0700 | [diff] [blame] | 204 | if [ ${FLAGS_syslinux} -eq ${FLAGS_TRUE} ]; then |
| 205 | update_syslinux_kernel |
Kees Cook | 7d7d2ef | 2011-10-18 13:12:12 -0700 | [diff] [blame] | 206 | fi |
Olof Johansson | 9a83e4e | 2012-08-17 02:45:12 -0700 | [diff] [blame] | 207 | |
| 208 | echo "copying modules" |
Andrew Chew | 9866d2f | 2015-04-07 10:50:59 -0700 | [diff] [blame] | 209 | if [ -d /build/"${FLAGS_board}"/lib/modules/ ]; then |
| 210 | remote_send_to /build/"${FLAGS_board}"/lib/modules/ /lib/modules/ |
| 211 | else |
| 212 | info "No modules. Skipping." |
| 213 | fi |
Olof Johansson | 9a83e4e | 2012-08-17 02:45:12 -0700 | [diff] [blame] | 214 | |
| 215 | echo "copying firmware" |
Doug Anderson | 48b5200 | 2012-12-07 12:40:07 -0800 | [diff] [blame] | 216 | remote_send_to /build/"${FLAGS_board}"/lib/firmware/ /lib/firmware/ |
Olof Johansson | 5a46bfb | 2010-12-22 12:14:21 -0800 | [diff] [blame] | 217 | fi |
| 218 | |
Doug Anderson | 5a21b44 | 2012-12-07 11:47:31 -0800 | [diff] [blame] | 219 | if [ ${FLAGS_vboot} -eq ${FLAGS_TRUE} ]; then |
| 220 | info "Copying vboot kernel image" |
| 221 | copy_kernelimage |
| 222 | else |
| 223 | info "Skipping update of vboot (per request)" |
| 224 | fi |
Olof Johansson | 8488f5a | 2011-04-20 17:27:37 -0700 | [diff] [blame] | 225 | |
Olof Johansson | 45225c9 | 2013-10-15 17:32:48 -0700 | [diff] [blame] | 226 | if [ ${FLAGS_bootonce} -eq ${FLAGS_TRUE} ]; then |
| 227 | info "Marking kernel partition ${FLAGS_partition} as boot once" |
| 228 | mark_boot_once |
| 229 | fi |
| 230 | |
Jonathan Kliegman | d6f3d07 | 2012-07-12 12:45:33 -0400 | [diff] [blame] | 231 | # An early kernel panic can prevent the normal sync on reboot. Explicitly |
| 232 | # sync for safety to avoid random file system corruption. |
| 233 | remote_sh sync |
| 234 | |
Doug Anderson | b2fe465 | 2012-12-07 17:33:56 -0800 | [diff] [blame] | 235 | if [ ${FLAGS_reboot} -eq ${FLAGS_TRUE} ]; then |
Olof Johansson | 8488f5a | 2011-04-20 17:27:37 -0700 | [diff] [blame] | 236 | remote_reboot |
| 237 | |
| 238 | remote_sh uname -r -v |
| 239 | info "old kernel: ${old_kernel}" |
| 240 | info "new kernel: ${REMOTE_OUT}" |
| 241 | else |
| 242 | info "Not rebooting (per request)" |
| 243 | fi |
Mandeep Singh Baines | a63cd2d | 2010-12-02 11:58:26 -0800 | [diff] [blame] | 244 | } |
| 245 | |
Olof Johansson | f53fa0d | 2011-01-26 13:06:46 -0800 | [diff] [blame] | 246 | main "$@" |