git: a599eea13521 - stable/13 - release: Remove C-like string comparison operator
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 05 Feb 2023 21:47:00 UTC
The branch stable/13 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=a599eea13521c7d1d26bc42bc944f2ac5f6fddbf commit a599eea13521c7d1d26bc42bc944f2ac5f6fddbf Author: Jose Luis Duran <jlduran@gmail.com> AuthorDate: 2021-06-20 00:00:19 +0000 Commit: Colin Percival <cperciva@FreeBSD.org> CommitDate: 2023-02-05 21:45:55 +0000 release: Remove C-like string comparison operator Per [(1), i.e. test(1), the string comparison operator should be `=`, not `==` in sh(1) scripts. No functional change. FreeBSD's test accepts `==` as an alias for `=` for compatibility with gnu test's `==` extension. Reviewed by: imp@, gjb@ Pull Request: https://github.com/freebsd/freebsd-src/pull/485 (cherry picked from commit 3f197b101f71ee4f4949c53bf330f61b43749ce9) --- release/tools/arm.subr | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/release/tools/arm.subr b/release/tools/arm.subr index 9758c898ca24..69f56c7c6520 100644 --- a/release/tools/arm.subr +++ b/release/tools/arm.subr @@ -69,13 +69,13 @@ arm_create_disk() { # Create the target raw file and temporary work directory. chroot ${CHROOTDIR} gpart create -s ${PART_SCHEME} ${mddev} - if [ "${PART_SCHEME}" == "GPT" ]; then + if [ "${PART_SCHEME}" = "GPT" ]; then chroot ${CHROOTDIR} gpart add -t efi -l efi -a 512k -s ${FAT_SIZE} ${mddev} chroot ${CHROOTDIR} newfs_msdos -L efi -F ${FAT_TYPE} /dev/${mddev}p1 chroot ${CHROOTDIR} gpart add -t freebsd-ufs -l rootfs -a 64k ${mddev} chroot ${CHROOTDIR} newfs -U -L rootfs /dev/${mddev}p2 fi - if [ "${PART_SCHEME}" == "MBR" ]; then + if [ "${PART_SCHEME}" = "MBR" ]; then chroot ${CHROOTDIR} gpart add -t '!12' -a 512k -s ${FAT_SIZE} ${mddev} chroot ${CHROOTDIR} gpart set -a active -i 1 ${mddev} chroot ${CHROOTDIR} newfs_msdos -L msdosboot -F ${FAT_TYPE} /dev/${mddev}s1 @@ -173,10 +173,10 @@ arm_setup_minimal_loader() { } arm_install_base() { - if [ "${PART_SCHEME}" == "GPT" ]; then + if [ "${PART_SCHEME}" = "GPT" ]; then chroot ${CHROOTDIR} mount /dev/${mddev}p2 ${DESTDIR} fi - if [ "${PART_SCHEME}" == "MBR" ]; then + if [ "${PART_SCHEME}" = "MBR" ]; then chroot ${CHROOTDIR} mount /dev/${mddev}s2a ${DESTDIR} fi _OSVERSION=$(chroot ${CHROOTDIR} /usr/bin/uname -U) @@ -200,13 +200,13 @@ arm_install_base() { echo '# Custom /etc/fstab for FreeBSD embedded images' \ > ${CHROOTDIR}/${DESTDIR}/etc/fstab - if [ "${PART_SCHEME}" == "GPT" ]; then + if [ "${PART_SCHEME}" = "GPT" ]; then echo "/dev/ufs/rootfs / ufs rw 1 1" \ >> ${CHROOTDIR}/${DESTDIR}/etc/fstab echo "/dev/msdosfs/EFI /boot/efi msdosfs rw,noatime 0 0" \ >> ${CHROOTDIR}/${DESTDIR}/etc/fstab fi - if [ "${PART_SCHEME}" == "MBR" ]; then + if [ "${PART_SCHEME}" = "MBR" ]; then echo "/dev/ufs/rootfs / ufs rw 1 1" \ >> ${CHROOTDIR}/${DESTDIR}/etc/fstab echo "/dev/msdosfs/MSDOSBOOT /boot/msdos msdosfs rw,noatime 0 0" \ @@ -236,11 +236,11 @@ arm_install_boot() { FATMOUNT="${DESTDIR%${KERNEL}}/fat" UFSMOUNT="${DESTDIR%${KERNEL}}/ufs" chroot ${CHROOTDIR} mkdir -p "${FATMOUNT}" "${UFSMOUNT}" - if [ "${PART_SCHEME}" == "GPT" ]; then + if [ "${PART_SCHEME}" = "GPT" ]; then dospart="/dev/${mddev}p1" ufspart="/dev/${mddev}p2" fi - if [ "${PART_SCHEME}" == "MBR" ]; then + if [ "${PART_SCHEME}" = "MBR" ]; then dospart="/dev/${mddev}s1" ufspart="/dev/${mddev}s2a" fi @@ -248,7 +248,7 @@ arm_install_boot() { chroot ${CHROOTDIR} mount_msdosfs ${dospart} ${FATMOUNT} chroot ${CHROOTDIR} mount ${ufspart} ${UFSMOUNT} - if [ "${EMBEDDED_TARGET}" == "arm" ]; then + if [ "${EMBEDDED_TARGET}" = "arm" ]; then chroot ${CHROOTDIR} cp -p ${UFSMOUNT}/boot/ubldr.bin \ ${FATMOUNT}/ubldr.bin fi