Fix the bug of INSTALLER_PID

It was previously variable. Changed it
 to env variable to refer from function
This commit is contained in:
Suikan 2021-07-01 22:38:49 +09:00
parent a0100fecd2
commit 395ed2654d
2 changed files with 2 additions and 2 deletions

View file

@ -12,7 +12,7 @@ function parainstall() {
sleep 1 # 1sec. sleep 1 # 1sec.
# Check if installer still exist # Check if installer still exist
if ! ps $installer_pid > /dev/null ; then # If not exists if ! ps $INSTALLER_PID > /dev/null ; then # If not exists
cat <<-HEREDOC 1>&2 cat <<-HEREDOC 1>&2
The installer terminated unexpectedly. The installer terminated unexpectedly.

View file

@ -91,7 +91,7 @@ function main() {
fg fg
# Record the PID of the installer. # Record the PID of the installer.
installer_pid=$! export INSTALLER_PID=$!
# Common part of the para-install. # Common part of the para-install.
# Record the install PID, modify the /etc/default/grub of the target, # Record the install PID, modify the /etc/default/grub of the target,