From 0e9cdc13ed84522655b15539bf55c654a44a8972 Mon Sep 17 00:00:00 2001 From: John Zimmermann Date: Wed, 12 May 2021 06:07:29 +0000 Subject: [PATCH] u-boot-menu: quote all the things At least the CMDLINE expansion did break on the printf '%s' and we got a newline for every parameter, which is wrong. (I'm suprised nobody noticed this, and how I not noticed this myself) --- srcpkgs/u-boot-menu/files/kernel.d/extlinux | 20 ++++++++++---------- srcpkgs/u-boot-menu/template | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/srcpkgs/u-boot-menu/files/kernel.d/extlinux b/srcpkgs/u-boot-menu/files/kernel.d/extlinux index 5a4465698a4..cb4bae4e09b 100644 --- a/srcpkgs/u-boot-menu/files/kernel.d/extlinux +++ b/srcpkgs/u-boot-menu/files/kernel.d/extlinux @@ -1,9 +1,9 @@ #!/bin/sh header() { - printf "TIMEOUT %s\n" ${TIMEOUT} > ${OUTFILE} - printf "DEFAULT entry0\n" >> ${OUTFILE} - printf "MENU TITLE Boot menu\n" >> ${OUTFILE} + printf "TIMEOUT %s\n" "${TIMEOUT}" > "${OUTFILE}" + printf "DEFAULT entry0\n" >> "${OUTFILE}" + printf "MENU TITLE Boot menu\n" >> "${OUTFILE}" } get_bootpath() { @@ -18,19 +18,19 @@ add_kernel() { fdt=$(get_bootpath "/boot/dtbs/dtbs-${ver}/${DTBPATH}") cmdline="${CMDLINE}" - printf "LABEL entry%s\n" ${ENTRY} >> ${OUTFILE} - printf "\tMENU LABEL Void Linux Version %s\n" ${ver} >> ${OUTFILE} - printf "\tLINUX %s\n" ${kernel} >> ${OUTFILE} + printf "LABEL entry%s\n" "${ENTRY}" >> "${OUTFILE}" + printf "\tMENU LABEL Void Linux Version %s\n" "${ver}" >> "${OUTFILE}" + printf "\tLINUX %s\n" "${kernel}" >> "${OUTFILE}" if [ -e "${BOOTPART}/${initrd}" ]; then - printf "\tINITRD %s\n" ${initrd} >> ${OUTFILE} + printf "\tINITRD %s\n" "${initrd}" >> "${OUTFILE}" fi if [ -n "${USE_DEVICETREEDIR}" ]; then - printf "\tDEVICETREEDIR %s\n" ${devicetreedir} >> ${OUTFILE} + printf "\tDEVICETREEDIR %s\n" "${devicetreedir}" >> "${OUTFILE}" elif [ -n "${DTBPATH}" ] && [ -e "${BOOTPART}/${fdt}" ]; then - printf "\tFDT %s\n" ${fdt} >> ${OUTFILE} + printf "\tFDT %s\n" ${fdt} >> "${OUTFILE}" fi if [ -n "${cmdline}" ]; then - printf "\tAPPEND %s\n" ${cmdline} >> ${OUTFILE} + printf "\tAPPEND %s\n" "${cmdline}" >> "${OUTFILE}" fi ENTRY=$(expr ${ENTRY} + 1) } diff --git a/srcpkgs/u-boot-menu/template b/srcpkgs/u-boot-menu/template index 5c5fb87639c..678c36d050a 100644 --- a/srcpkgs/u-boot-menu/template +++ b/srcpkgs/u-boot-menu/template @@ -1,7 +1,7 @@ # Template file for 'u-boot-menu' pkgname=u-boot-menu version=0.2 -revision=2 +revision=3 conf_files="/etc/default/extlinux" short_desc="Create an u-boot menu with currently available kernels" maintainer="Remi Pommarel "