156d3495e0
Several elements were using almost similar code to get the current kernel and initrd inside an image. After factoring out this code into a common element, modify the elements to make use of it. Change-Id: Ib547cd96b2b354b1c97342cacf5f0d0a3f70a3da
10 lines
211 B
Bash
Executable file
10 lines
211 B
Bash
Executable file
#!/bin/bash
|
|
|
|
set -eu
|
|
set -o pipefail
|
|
|
|
RET=$(/bin/select-boot-kernel-initrd)
|
|
KERNEL_VERSION=`echo ${RET%:*} | sed 's/vmlinuz-//g'`
|
|
RAMDISK=/boot/${RET#*:}
|
|
|
|
dracut --force --add "network" $RAMDISK $KERNEL_VERSION
|