mirror of
https://github.com/suiryc/archlinux-initrd-ssh-cryptsetup.git
synced 2026-07-27 20:27:00 +03:00
Fixed a few variables declaration/reading
Depending on configuration and what happens, some variable may not be initialized.
This commit is contained in:
@@ -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=
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user