mirror of
https://github.com/Kron4ek/Conty
synced 2025-01-13 20:01:41 +01:00
Remove reduntant sudo variable
This commit is contained in:
parent
9313aa4e74
commit
e8a73f4cea
1 changed files with 4 additions and 5 deletions
|
@ -31,7 +31,7 @@ export working_dir=/tmp/"$(basename "${script}")"_"${USER}"_"${script_md5}"
|
||||||
# a problem with mounting the squashfs image due to an incorrectly calculated offset.
|
# a problem with mounting the squashfs image due to an incorrectly calculated offset.
|
||||||
|
|
||||||
# The size of this script
|
# The size of this script
|
||||||
scriptsize=17996
|
scriptsize=17971
|
||||||
|
|
||||||
# The size of the utils.tar archive
|
# The size of the utils.tar archive
|
||||||
# utils.tar contains bwrap and squashfuse binaries
|
# utils.tar contains bwrap and squashfuse binaries
|
||||||
|
@ -455,7 +455,7 @@ trap_exit () {
|
||||||
|
|
||||||
if [ ! "$(ls "${working_dir}"/running_* 2>/dev/null)" ]; then
|
if [ ! "$(ls "${working_dir}"/running_* 2>/dev/null)" ]; then
|
||||||
"${fmount}" -uz "${working_dir}"/mnt 2>/dev/null || \
|
"${fmount}" -uz "${working_dir}"/mnt 2>/dev/null || \
|
||||||
${sudo_umount} umount --lazy "${working_dir}"/mnt 2>/dev/null
|
${use_sudo} umount --lazy "${working_dir}"/mnt 2>/dev/null
|
||||||
|
|
||||||
rm -rf "${working_dir}"
|
rm -rf "${working_dir}"
|
||||||
fi
|
fi
|
||||||
|
@ -469,15 +469,14 @@ if [ -n "${SUDO_MOUNT}" ]; then
|
||||||
echo "Using regular mount command (sudo mount) instead of squashfuse"
|
echo "Using regular mount command (sudo mount) instead of squashfuse"
|
||||||
|
|
||||||
sfuse=mount
|
sfuse=mount
|
||||||
sudo_mount=sudo
|
use_sudo=sudo
|
||||||
sudo_umount=sudo
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Mount boostrap image
|
# Mount boostrap image
|
||||||
mkdir -p "${working_dir}"/mnt
|
mkdir -p "${working_dir}"/mnt
|
||||||
|
|
||||||
if [ "$(ls "${working_dir}"/mnt 2>/dev/null)" ] || \
|
if [ "$(ls "${working_dir}"/mnt 2>/dev/null)" ] || \
|
||||||
${sudo_mount} "${sfuse}" -o offset="${offset}",ro "${script}" "${working_dir}"/mnt ; then
|
${use_sudo} "${sfuse}" -o offset="${offset}",ro "${script}" "${working_dir}"/mnt ; then
|
||||||
echo 1 > "${working_dir}"/running_"${script_id}"
|
echo 1 > "${working_dir}"/running_"${script_id}"
|
||||||
|
|
||||||
echo "Running Conty"
|
echo "Running Conty"
|
||||||
|
|
Loading…
Reference in a new issue