From 14a74a038554245cb4bed1cb7dfd2e20265e0788 Mon Sep 17 00:00:00 2001 From: Julien Coloos Date: Sun, 12 Jul 2026 20:15:29 +0200 Subject: [PATCH] Fixed a few variables declaration/reading Depending on configuration and what happens, some variable may not be initialized. --- src/hooks/ssh-cryptsetup | 3 +-- src/hooks/ssh-cryptsetup-tools | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/hooks/ssh-cryptsetup b/src/hooks/ssh-cryptsetup index ab64bca..7d30dba 100644 --- a/src/hooks/ssh-cryptsetup +++ b/src/hooks/ssh-cryptsetup @@ -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= diff --git a/src/hooks/ssh-cryptsetup-tools b/src/hooks/ssh-cryptsetup-tools index eecd655..c77f3a9 100644 --- a/src/hooks/ssh-cryptsetup-tools +++ b/src/hooks/ssh-cryptsetup-tools @@ -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