Skip to content

Commit b880006

Browse files
committed
30-install-packages.sh: Use head instead of hexdump
The code changes in `30-install-packages.sh` modify the package installation script to use the `head` command instead of `hexdump` for checking the ELF header of the `apt-get` command. This change will allow the use of "Ubuntu Minimal Cloud Images" that do not include `hexdump`. https://cloud-images.ubuntu.com/minimal/releases/ Signed-off-by: Norio Nomura <[email protected]>
1 parent f7108eb commit b880006

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/cidata/cidata.TEMPLATE.d/boot/30-install-packages.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ if [ "${LIMA_CIDATA_SKIP_DEFAULT_DEPENDENCY_RESOLUTION}" = 1 ]; then
3434
exit 0
3535
fi
3636

37-
if hexdump -C -n 4 "$(command -v apt-get)" | grep -qF 'ELF' >/dev/null 2>&1; then
37+
if head -c 4 "$(command -v apt-get)" | grep -qP '\x7fELF' >/dev/null 2>&1; then
3838
pkgs=""
3939
if [ "${LIMA_CIDATA_MOUNTTYPE}" = "reverse-sshfs" ]; then
4040
if [ "${LIMA_CIDATA_MOUNTS}" -gt 0 ] && ! command -v sshfs >/dev/null 2>&1; then

0 commit comments

Comments
 (0)