From a4ed6cdbdbf40d202a342acf530dbf3a44712336 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Tue, 12 Nov 2024 10:25:44 +0100 Subject: [PATCH] fixes --- bash/mount.sh | 6 +++--- bash/rescue.sh | 2 +- bash/util.sh | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/bash/mount.sh b/bash/mount.sh index b9bc609..ca6ac45 100644 --- a/bash/mount.sh +++ b/bash/mount.sh @@ -9,7 +9,7 @@ mo() { mkdir {lower,upper,work,mount} if mount "${file}" "lower" ; then mount \ - -o lowerdir="lower",upperdir="upper",workdir="work" + -o lowerdir="lower",upperdir="upper",workdir="work" \ -t "overlay" \ "overlay" "mount" fi @@ -72,9 +72,9 @@ um() { ms() { local directory="${1}" local level="${2}" - if [ "${directory}" ] ; then + if [ -n "${directory}" ] ; then if mkdir "${directory}" ; then - [ "${level}" ] || level="18" + [ -n "${level}" ] || level="18" cp overlay/mount/{vmlinuz,initrd.img} "${directory}" mksquashfs \ "overlay/mount" "${directory}/filesystem.squashfs" \ diff --git a/bash/rescue.sh b/bash/rescue.sh index 3a4bb7d..58076e6 100644 --- a/bash/rescue.sh +++ b/bash/rescue.sh @@ -73,7 +73,7 @@ rescue_install() { rescue_upload() { local host="${1}" local hostname="${2}" - if [ "${hostname}" ]; then + if [ -n "${hostname}" ]; then local user="root" # local user_host="${user}@${host}" diff --git a/bash/util.sh b/bash/util.sh index 2711b03..458995f 100644 --- a/bash/util.sh +++ b/bash/util.sh @@ -13,7 +13,7 @@ read_passphrase() { read_secret() { local prompt="${1}" local secret - printf "${prompt}" 1>&2 + printf "%s" "${prompt}" 1>&2 read -r -s secret echo >&2 echo "${secret}"