Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[arista] Fix convertfs condition for booting from EOS #4139

Merged
merged 1 commit into from
Feb 12, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion files/Aboot/boot0.j2
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ write_boot_configs() {
}

run_kexec() {
local cmdline="$(cat $cmdline_image | tr '\n' ' ')"
local cmdline="$(cat $cmdline_image | tr '\n' ' ') $ENV_EXTRA_CMDLINE"
local kernel="${KERNEL:-$(find $image_path/boot -name 'vmlinuz-*' -type f | head -n 1)}"
local initrd="${INITRD:-$(find $image_path/boot -name 'initrd.img-*' -type f | head -n 1)}"

Expand Down
11 changes: 9 additions & 2 deletions files/initramfs-tools/arista-convertfs.j2
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ flash_dev=''
block_flash=''
aboot_flag=''
backup_file=''
prev_os=''
sonic_fast_reboot=''

# Wait until get the fullpath of flash device, e.g., /dev/sda
wait_get_flash_dev() {
Expand Down Expand Up @@ -133,16 +135,21 @@ for x in "$@"; do
docker_inram=*)
docker_inram="${x#docker_inram=}"
;;
prev_os=*)
prev_os="${x#prev_os=}"
;;
SONIC_BOOT_TYPE=warm*|SONIC_BOOT_TYPE=fast*)
# Skip this script for warm-reboot and fast-reboot
exit 0
sonic_fast_reboot=true
;;
esac
done

# Check aboot
[ -z "$aboot_flag" ] && exit 0

# Skip this script for warm-reboot/fast-reboot from sonic
[ "$sonic_fast_reboot" == true ] && [ "$prev_os" != eos ] && exit 0

# Get flash dev name
if [ -z "$block_flash" ]; then
echo "Error: flash device info is not provided"
Expand Down