Fixed a few variables declaration/reading

Depending on configuration and what happens, some variable may not be
initialized.
This commit is contained in:
Julien Coloos
2026-07-12 20:15:29 +02:00
parent 6c1945a787
commit 14a74a0385
2 changed files with 2 additions and 3 deletions

View File

@@ -98,7 +98,7 @@ sshcs_trap_timeout() {
}
sshcs_untrap_timeout() {
[ -z "${pid_timeout}" ] && return 0
[ -z "${pid_timeout:-}" ] && return 0
# Notes:
# If there was a running SSH shell, it may also try to kill it.
# This only kills the spawned subshell, leaving the 'sleep' command still
@@ -118,7 +118,6 @@ sshcs_shell_run() {
}
sshcs_dropbear_run() {
local pid_timeout=
local dev_pts_mounted=0
local listen=

View File

@@ -134,7 +134,7 @@ sshcs_cleanup() {
fi
# cleanup /dev/pts if necessary
if [ ${dev_pts_mounted} -ne 0 ]; then
if [ ${dev_pts_mounted:-0} -ne 0 ]; then
umount "/dev/pts"
rm -R "/dev/pts"
fi