This commit is contained in:
Marc Beninca 2024-11-12 10:25:44 +01:00
parent 88162d22fe
commit a4ed6cdbdb
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F
3 changed files with 5 additions and 5 deletions

View file

@ -9,7 +9,7 @@ mo() {
mkdir {lower,upper,work,mount} mkdir {lower,upper,work,mount}
if mount "${file}" "lower" ; then if mount "${file}" "lower" ; then
mount \ mount \
-o lowerdir="lower",upperdir="upper",workdir="work" -o lowerdir="lower",upperdir="upper",workdir="work" \
-t "overlay" \ -t "overlay" \
"overlay" "mount" "overlay" "mount"
fi fi
@ -72,9 +72,9 @@ um() {
ms() { ms() {
local directory="${1}" local directory="${1}"
local level="${2}" local level="${2}"
if [ "${directory}" ] ; then if [ -n "${directory}" ] ; then
if mkdir "${directory}" ; then if mkdir "${directory}" ; then
[ "${level}" ] || level="18" [ -n "${level}" ] || level="18"
cp overlay/mount/{vmlinuz,initrd.img} "${directory}" cp overlay/mount/{vmlinuz,initrd.img} "${directory}"
mksquashfs \ mksquashfs \
"overlay/mount" "${directory}/filesystem.squashfs" \ "overlay/mount" "${directory}/filesystem.squashfs" \

View file

@ -73,7 +73,7 @@ rescue_install() {
rescue_upload() { rescue_upload() {
local host="${1}" local host="${1}"
local hostname="${2}" local hostname="${2}"
if [ "${hostname}" ]; then if [ -n "${hostname}" ]; then
local user="root" local user="root"
# #
local user_host="${user}@${host}" local user_host="${user}@${host}"

View file

@ -13,7 +13,7 @@ read_passphrase() {
read_secret() { read_secret() {
local prompt="${1}" local prompt="${1}"
local secret local secret
printf "${prompt}" 1>&2 printf "%s" "${prompt}" 1>&2
read -r -s secret read -r -s secret
echo >&2 echo >&2
echo "${secret}" echo "${secret}"