mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-19 17:26:28 +00:00
fix some shellcheck issues
In d4m.sh line 14: (cd $DB && \ ^-- SC2086: Double quote to prevent globbing and word splitting. In d4m.sh line 21: (cd $DB; git reset --hard) ^-- SC2086: Double quote to prevent globbing and word splitting. In d4m.sh line 22: if [ -f ${DB}/${DB_BRIDGE} ]; then ^-- SC2086: Double quote to prevent globbing and word splitting. In d4m.sh line 23: content=$(cat ${DB}/${DB_BRIDGE}) ^-- SC2086: Double quote to prevent globbing and word splitting. In d4m.sh line 24: [ ${content} != "1" ] && enable_bridge ^-- SC2086: Double quote to prevent globbing and word splitting. In d4m.sh line 34: dd if=/dev/zero of=$DISK bs=1048576 count=256 ^-- SC2086: Double quote to prevent globbing and word splitting. Signed-off-by: Tycho Andersen <tycho@docker.com>
This commit is contained in:
parent
ab6575c089
commit
fb22969380
@ -11,17 +11,17 @@ DB_BRIDGE=com.docker.driver.amd64-linux/slirp/bridge-connections
|
||||
|
||||
# Check if VPNKit L2 bridge mode is enabled
|
||||
enable_bridge() {
|
||||
(cd $DB && \
|
||||
(cd "${DB}" && \
|
||||
echo -n "1" > ${DB_BRIDGE} && \
|
||||
git add ${DB_BRIDGE} && \
|
||||
git commit -m "enable bridge"
|
||||
)
|
||||
}
|
||||
|
||||
(cd $DB; git reset --hard)
|
||||
if [ -f ${DB}/${DB_BRIDGE} ]; then
|
||||
content=$(cat ${DB}/${DB_BRIDGE})
|
||||
[ ${content} != "1" ] && enable_bridge
|
||||
(cd "${DB}"; git reset --hard)
|
||||
if [ -f "${DB}/${DB_BRIDGE}" ]; then
|
||||
content=$(cat "${DB}/${DB_BRIDGE}")
|
||||
[ "${content}" != "1" ] && enable_bridge
|
||||
else
|
||||
enable_bridge
|
||||
fi
|
||||
@ -31,7 +31,7 @@ KERNEL="kernel/x86_64/vmlinuz64"
|
||||
CMDLINE="earlyprintk=serial console=ttyS0"
|
||||
|
||||
DISK=$(mktemp disk.img.XXXX)
|
||||
dd if=/dev/zero of=$DISK bs=1048576 count=256
|
||||
dd if=/dev/zero of="$DISK" bs=1048576 count=256
|
||||
|
||||
MEM="-m 1G"
|
||||
SMP="-c 1"
|
||||
|
Loading…
Reference in New Issue
Block a user