# This is a helper function which prints an error message and exits
fatal()
{
- echo "$PROG: error: $1" 1>&2
+ printf "%s\n" "$PROG: error: $1" 1>&2
exit 1
}
while [ "$pnum" -lt "$INSTALLERFW_PART_COUNT" ]; do
mountpoint="INSTALLERFW_PART${pnum}_MOUNTPOINT"
- mountpoint="$(eval echo '$'$mountpoint)"
+ mountpoint="$(eval printf "%s" '$'$mountpoint)"
# Find out all the required data for the root and boot partition
if [ "$mountpoint" == "/" ]; then
root_partuuid=INSTALLERFW_PART${pnum}_PARTUUID
- root_partuuid="$(eval echo '$'$root_partuuid)"
+ root_partuuid="$(eval printf "%s" '$'$root_partuuid)"
elif [ "$mountpoint" == "$boot_mountpoint" ]; then
boot_fstype=INSTALLERFW_PART${pnum}_FSTYPE
- boot_fstype="$(eval echo '$'$boot_fstype)"
+ boot_fstype="$(eval printf "%s" '$'$boot_fstype)"
fi
pnum="$((pnum+1))"
# Find out the latest kernel binary in boot partition
vmlinuz="$(ls -1 "$boot_mountpoint" | grep "^vmlinuz-" | sort -r | head -n1)"
-vmlinuz_version="$(echo $vmlinuz | sed -e 's/vmlinuz-\(.*\)/\1/')"
+vmlinuz_version="$(printf "%s" $vmlinuz | sed -e 's/vmlinuz-\(.*\)/\1/')"
# Create the gummiboot configuration file
mkdir -p "$boot_mountpoint/loader"