Skip to content

Commit 10bc4dc

Browse files
committed
shellcheck: SC2166: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
Signed-off-by: Akihiro Suda <[email protected]>
1 parent 8564e80 commit 10bc4dc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ if [ "$(awk '$2 == "/" {print $3}' /proc/mounts)" == "tmpfs" ]; then
2222
IN_USE=false
2323
# Looking for a disk that is not mounted or partitioned
2424
for PART in $(awk '/^\/dev\// {gsub("/dev/", ""); print $1}' /proc/mounts); do
25-
if [ "${DISK}" == "${PART}" -o -e /sys/block/${DISK}/${PART} ]; then
25+
if [ "${DISK}" == "${PART}" ] || [ -e /sys/block/${DISK}/${PART} ]; then
2626
IN_USE=true
2727
break
2828
fi

0 commit comments

Comments
 (0)