mirror of
https://github.com/kernelkit/infix.git
synced 2026-07-22 01:13:00 +02:00
Merge pull request #1330 from kernelkit/qemu-add-sbin-to-path
qemu: fix /cfg mount failure due to missing mkfs.ext4 in PATH [skip ci]
This commit is contained in:
@@ -19,6 +19,9 @@
|
||||
#
|
||||
# shellcheck disable=SC3037
|
||||
|
||||
# Add /sbin to PATH for mkfs.ext4 and such (not default in debian)
|
||||
export PATH="/sbin:/usr/sbin:$PATH"
|
||||
|
||||
qdir=$(dirname "$(readlink -f "$0")")
|
||||
imgdir=$(readlink -f "${qdir}/..")
|
||||
prognm=$(basename "$0")
|
||||
@@ -174,6 +177,8 @@ rw_args()
|
||||
{
|
||||
[ "$CONFIG_QEMU_RW" ] || return
|
||||
|
||||
command -v mkfs.ext4 >/dev/null || die "$prognm: cannot find mkfs.ext4"
|
||||
|
||||
if ! [ -f "aux.ext4" ]; then
|
||||
dd if=/dev/zero of="aux.ext4" bs=1M count=1 >/dev/null 2>&1
|
||||
mkfs.ext4 -L aux "aux.ext4" >/dev/null 2>&1
|
||||
|
||||
Reference in New Issue
Block a user