cloud-init-dev team mailing list archive
-
cloud-init-dev team
-
Mailing list archive
-
Message #01522
Re: [Merge] ~smoser/cloud-init:bug/1379080-fix-xen-kernel-detection into cloud-init:ubuntu/devel
Review: Needs Fixing
Diff comments:
> diff --git a/debian/update-grub-legacy-ec2 b/debian/update-grub-legacy-ec2
> index 19648f6..c7a5687 100755
> --- a/debian/update-grub-legacy-ec2
> +++ b/debian/update-grub-legacy-ec2
> @@ -1398,9 +1398,19 @@ fi
>
>
> if ! type is_xen_kernel >/dev/null 2>&1; then
> + check_xen_config_for_kernel() {
> + local kernel="$1" config="" dir="" bname=""
> + dir=${kernel%/*}
> + bname=${kernel##*/}
> + config=config-${bname#*-}
> + [ -f "$config" ] || return 1
This will always return 1 because it will look in the current directory when it should look in $dir.
> + grep -q CONFIG_XEN=y "$config"
> + }
> +
> is_xen_kernel() {
> # input is like /boot/vmlinuz-2.6.35-13-virtual
> # get the version string out of it.
This comment refers to the code under the added line; it should probably move down.
> + check_xen_config_for_kernel "$1" && return 0
> local ver_flavor="";
> ver_flavor="${1##*vmlinuz-}"
>
--
https://code.launchpad.net/~smoser/cloud-init/+git/cloud-init/+merge/314623
Your team cloud init development team is requested to review the proposed merge of ~smoser/cloud-init:bug/1379080-fix-xen-kernel-detection into cloud-init:ubuntu/devel.
References