1
0
Fork 0
mirror of https://github.com/aclist/dztui.git synced 2024-12-29 13:52:03 +01:00

fix: do not capture return code of local var declaration

This commit is contained in:
aclist 2023-05-15 10:56:52 +09:00
parent 6ceac787f0
commit e67c77ac84

View file

@ -1,7 +1,7 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -o pipefail set -o pipefail
version=3.2.23 version=3.2.24
aid=221100 aid=221100
game="dayz" game="dayz"
@ -1748,7 +1748,8 @@ check_map_count(){
if [[ ! -f /etc/sysctl.d/dayz.conf ]]; then if [[ ! -f /etc/sysctl.d/dayz.conf ]]; then
$steamsafe_zenity --question --width 500 --title="DZGUI" --cancel-label="Cancel" --ok-label="OK" --text "sudo password required to check system vm map count." 2>/dev/null $steamsafe_zenity --question --width 500 --title="DZGUI" --cancel-label="Cancel" --ok-label="OK" --text "sudo password required to check system vm map count." 2>/dev/null
if [[ $? -eq 0 ]]; then if [[ $? -eq 0 ]]; then
local pass=$($steamsafe_zenity --password) local pass
pass=$($steamsafe_zenity --password)
[[ $? -eq 1 ]] && exit 1 [[ $? -eq 1 ]] && exit 1
local ct=$(sudo -S <<< "$pass" sh -c "sysctl -q vm.max_map_count | awk -F'= ' '{print \$2}'") local ct=$(sudo -S <<< "$pass" sh -c "sysctl -q vm.max_map_count | awk -F'= ' '{print \$2}'")
local new_ct local new_ct