Fixed formatting, very minor issues caught by shellcheck
This commit is contained in:
parent
fa02cc2231
commit
c36d9ef1c8
11
qq2clone
11
qq2clone
|
@ -185,7 +185,7 @@ declare -g lv_api_temp;
|
|||
lv_api_temp="$(mktemp -d )" || temp_error
|
||||
mkfifo "${lv_api_temp}/lv_api_do_fifo" || fifo_error
|
||||
exec 4<>"${lv_api_temp}/lv_api_do_fifo"
|
||||
${QQ2_DIR}/lv_api_do <&4 >&3 2>/dev/null &
|
||||
"${QQ2_DIR}/lv_api_do" <&4 >&3 2>/dev/null &
|
||||
|
||||
local check
|
||||
read -r check <&3
|
||||
|
@ -340,6 +340,7 @@ else
|
|||
fi
|
||||
return 0
|
||||
}
|
||||
#=========================================================================#
|
||||
first_run_setup ()
|
||||
# DESCRIPTION: Generate a new database with default config values,
|
||||
# create subdirectories of QQ2_DIR
|
||||
|
@ -399,8 +400,7 @@ return 0
|
|||
get_config ()
|
||||
# DESCRIPTION: Load configuration from database
|
||||
# INPUT: None
|
||||
# OUTPUT: Error message and exit $E_config if there is a problem, otherwise
|
||||
# declare and populate global array OPT
|
||||
# OUTPUT: Silent except on error
|
||||
# PARAMETERS: None
|
||||
#=========================================================================#
|
||||
{
|
||||
|
@ -413,7 +413,7 @@ read -r check \
|
|||
< <(sqlite3 "select exists ( select * from CONFIG)")
|
||||
((check)) ||
|
||||
{ echo "Is the database corrupt? No CONFIG table!" 2>/dev/null;
|
||||
exit "$E_config"; }
|
||||
exit "$E_unexpected"; }
|
||||
|
||||
chmod +x "${QQ2_DIR}/lv_api_do" &>/dev/null ||
|
||||
{ echo "lv_api_do is missing from $QQ2_DIR, or has bad permissions";
|
||||
|
@ -630,6 +630,7 @@ while read -r line; do
|
|||
done < <(read_pipe)
|
||||
return 0
|
||||
}
|
||||
#=========================================================================#
|
||||
get_disk_devices_db ()
|
||||
# DESCRIPTION: Like get_disk_devices, but get info from the database
|
||||
# INPUT: Machine number, or omit to get template info
|
||||
|
@ -2893,7 +2894,7 @@ while getopts "${short}Q" opt; do
|
|||
{ echo "Virsh cannot connect to URI \"$OPTARG\", exiting" >&2;
|
||||
exit "$E_args"; }
|
||||
;;
|
||||
f) OPT[USE_SPICE]=0
|
||||
f) OPT[USE_SPICE]=0
|
||||
;;
|
||||
g) OPT[USE_SPICE]=1
|
||||
;;
|
||||
|
|
Loading…
Reference in New Issue