mirror of
https://github.com/Kron4ek/Conty
synced 2024-12-26 09:58:38 +01:00
Make the mount command more readable
This commit is contained in:
parent
b09a683ccf
commit
c54e734987
1 changed files with 17 additions and 5 deletions
|
@ -794,14 +794,26 @@ if [ -f "${nvidia_drivers_dir}"/lock ] && [ ! "$(ls "${working_dir}"/running_* 2
|
||||||
rm -f "${nvidia_drivers_dir}"/lock
|
rm -f "${nvidia_drivers_dir}"/lock
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "${dwarfs_image}" = 1 ]; then
|
||||||
|
mount_command=("${mount_tool}" \
|
||||||
|
"${script}" "${mount_point}" \
|
||||||
|
-o offset="${offset}" \
|
||||||
|
-o debuglevel=error \
|
||||||
|
-o workers="${dwarfs_num_workers}" \
|
||||||
|
-o mlock=try \
|
||||||
|
-o no_cache_image \
|
||||||
|
-o cache_files \
|
||||||
|
-o cachesize="${dwarfs_cache_size}")
|
||||||
|
else
|
||||||
|
mount_command=("${mount_tool}" \
|
||||||
|
-o offset="${offset}",ro \
|
||||||
|
"${script}" "${mount_point}")
|
||||||
|
fi
|
||||||
|
|
||||||
# Mount the image
|
# Mount the image
|
||||||
mkdir -p "${mount_point}"
|
mkdir -p "${mount_point}"
|
||||||
|
|
||||||
if [ "$(ls "${mount_point}" 2>/dev/null)" ] || \
|
if [ "$(ls "${mount_point}" 2>/dev/null)" ] || launch_wrapper "${mount_command[@]}"; then
|
||||||
( [ "${dwarfs_image}" != 1 ] && launch_wrapper "${mount_tool}" -o offset="${offset}",ro "${script}" "${mount_point}" ) || \
|
|
||||||
launch_wrapper "${mount_tool}" "${script}" "${mount_point}" -o offset="${offset}" -o debuglevel=error -o workers="${dwarfs_num_workers}" \
|
|
||||||
-o mlock=try -o no_cache_image -o cache_files -o cachesize="${dwarfs_cache_size}"; then
|
|
||||||
|
|
||||||
if [ "$1" = "-m" ] && [ -z "${script_is_symlink}" ]; then
|
if [ "$1" = "-m" ] && [ -z "${script_is_symlink}" ]; then
|
||||||
if [ ! -f "${working_dir}"/running_mount ]; then
|
if [ ! -f "${working_dir}"/running_mount ]; then
|
||||||
echo 1 > "${working_dir}"/running_mount
|
echo 1 > "${working_dir}"/running_mount
|
||||||
|
|
Loading…
Reference in a new issue