From 9071dbf2ff2b169645f21655ccc8f70d37564ee1 Mon Sep 17 00:00:00 2001
From: shenmo <jifengshenmo@outlook.com>
Date: Sun, 27 Apr 2025 19:08:24 +0000
Subject: [PATCH] Revert "update src/opt/apps/@PKG_NAME@/files/bin/ace-init."

This reverts commit 05c5b4a2b90525ba78e89e3fb0245e6dd513e6fe.
---
 src/opt/apps/@PKG_NAME@/files/bin/ace-init | 23 ++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/src/opt/apps/@PKG_NAME@/files/bin/ace-init b/src/opt/apps/@PKG_NAME@/files/bin/ace-init
index eb8d1a1..893ae7c 100755
--- a/src/opt/apps/@PKG_NAME@/files/bin/ace-init
+++ b/src/opt/apps/@PKG_NAME@/files/bin/ace-init
@@ -86,6 +86,29 @@ chmod 777 $chrootEnvPath/etc/localtime
 bookworm-run cp /host/etc/locale.gen /etc/locale.gen && locale-gen
 bookworm-run touch /finish.flag
 bookworm-run apt clean
+bookworm-run chown -R $(who | awk '{print $1}' | head -n 1)  /usr/lib/locale/
+sudo -u $(who | awk '{print $1}' | head -n 1) bwrap --dev-bind $chrootEnvPath/ / \
+  --setenv PULSE_SERVER /run/user/$uid/pulse/native \
+  --setenv PATH /amber-ce-tools/bin-override:$PATH \
+  --setenv IS_ACE_ENV "1" \
+  --dev-bind $chrootEnvPath/ / \
+  --dev-bind-try /media /media \
+  --dev-bind-try /tmp /tmp \
+  --dev /dev  \
+  --dev-bind-try /dev/dri /dev/dri  \
+  --proc /proc  \
+  --dev-bind /sys /sys  \
+  --dev-bind /run /run  \
+  --dev-bind-try /run/user/$uid/pulse /run/user/$uid/pulse  \
+  --dev-bind / /host \
+  --bind-try /usr/share/themes /usr/local/share/themes  \
+  --bind-try /usr/share/icons /usr/local/share/icons  \
+  --bind-try /usr/share/fonts /usr/local/share/fonts  \
+  --hostname @HOST_NAME@ \
+  --unshare-uts \
+  --dev-bind-try /etc/resolv.conf /etc/resolv.conf \
+  --dev-bind-try /home /home \
+  locale-gen
 bookworm-run update-locale LANG=$LANG
 chown -R root $chrootEnvPath
 chmod 777 -R $chrootEnvPath/usr/share/icons