From 89242bcdbd35c9b6f9b896fad9ca2065023f95fc Mon Sep 17 00:00:00 2001 From: aclist Date: Sun, 7 May 2023 04:42:01 +0900 Subject: [PATCH] fix: fix for #61 --- changelog.md | 4 ++++ dzgui.sh | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/changelog.md b/changelog.md index 06632f7..a635b83 100644 --- a/changelog.md +++ b/changelog.md @@ -5,6 +5,10 @@ - Custom query API - Standardize dialogs +## [3.3.0-rc.17] 2023-05-07 +### Fixed +- Use sudo when checking vm map count (#61) + ## [3.3.0-rc.16] 2023-05-06 ### Fixed - Steam beta console not focusing (#60) diff --git a/dzgui.sh b/dzgui.sh index e4203e1..5fd6344 100755 --- a/dzgui.sh +++ b/dzgui.sh @@ -1764,7 +1764,7 @@ setup(){ check_map_count(){ count=1048576 echo "[DZGUI] Checking system map count" - if [[ $(sysctl -q vm.max_map_count | awk -F"= " '{print $2}') -lt $count ]]; then + if [[ $(sudo sysctl -q vm.max_map_count | awk -F"= " '{print $2}') -lt $count ]]; then $steamsafe_zenity --question --width 500 --title="DZGUI" --text "System map count must be $count or higher to run DayZ with Wine.\nIncrease map count and make this change permanent? (will prompt for sudo password)" 2>/dev/null if [[ $? -eq 0 ]]; then pass=$($steamsafe_zenity --password)