Skip to content

Commit 33df81f

Browse files
committed
cidata: avoid bash when avoidable
Signed-off-by: Akihiro Suda <[email protected]>
1 parent 2c3c44a commit 33df81f

File tree

5 files changed

+12
-9
lines changed

5 files changed

+12
-9
lines changed

pkg/cidata/cidata.TEMPLATE.d/boot/05-persistent-data-volume.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
#!/bin/bash
2+
# bash is used for enabling `set -o pipefail`.
3+
# NOTE: On Alpine, /bin/bash is ash with ASH_BASH_COMPAT, not GNU bash
24
set -eux -o pipefail
35

46
# Restrict the rest of this script to Alpine until it has been tested with other distros

pkg/cidata/cidata.TEMPLATE.d/boot/10-alpine-prep.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#!/bin/bash
2-
set -eux -o pipefail
1+
#!/bin/sh
2+
set -eux
33

44
# This script prepares Alpine for lima; there is nothing in here for other distros
55
test -f /etc/alpine-release || exit 0

pkg/cidata/cidata.TEMPLATE.d/boot/20-rootless-base.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#!/bin/bash
2-
set -eux -o pipefail
1+
#!/bin/sh
2+
set -eux
33

44
# This script does not work unless systemd is available
55
command -v systemctl 2>&1 >/dev/null || exit 0

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
#!/bin/bash
2-
set -eux -o pipefail
1+
#!/bin/sh
2+
set -eux
33

44
# Install minimum dependencies
55
if command -v apt-get 2>&1 >/dev/null; then
6-
export DEBIAN_FRONTEND=noninteractive
6+
DEBIAN_FRONTEND=noninteractive
7+
export DEBIAN_FRONTEND
78
apt-get update
89
if [ "${LIMA_CIDATA_MOUNTS}" -gt 0 ]; then
910
apt-get install -y sshfs

pkg/cidata/cidata.TEMPLATE.d/boot/40-install-containerd.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#!/bin/bash
2-
set -eux -o pipefail
1+
#!/bin/sh
2+
set -eux
33

44

55
if [ "${LIMA_CIDATA_CONTAINERD_SYSTEM}" != 1 ] && [ "${LIMA_CIDATA_CONTAINERD_USER}" != 1 ]; then

0 commit comments

Comments
 (0)