Update install.func
This commit is contained in:
@@ -894,6 +894,13 @@ setting_up_container() {
|
|||||||
if [[ "$PKG_MANAGER" == "pacman" && -f /etc/pacman.conf ]]; then
|
if [[ "$PKG_MANAGER" == "pacman" && -f /etc/pacman.conf ]]; then
|
||||||
sed -i 's/^\s*DownloadUser\s*=.*/#&/' /etc/pacman.conf
|
sed -i 's/^\s*DownloadUser\s*=.*/#&/' /etc/pacman.conf
|
||||||
grep -q '^DisableSandbox' /etc/pacman.conf || sed -i '/^\[options\]/a DisableSandbox' /etc/pacman.conf
|
grep -q '^DisableSandbox' /etc/pacman.conf || sed -i '/^\[options\]/a DisableSandbox' /etc/pacman.conf
|
||||||
|
|
||||||
|
# Initialize pacman keyring (required for signature verification on first
|
||||||
|
# upgrade). The Arch base template ships without an initialized keyring.
|
||||||
|
if [[ ! -f /etc/pacman.d/gnupg/pubring.gpg ]] || [[ ! -s /etc/pacman.d/gnupg/pubring.gpg ]]; then
|
||||||
|
$STD pacman-key --init
|
||||||
|
$STD pacman-key --populate archlinux
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Disable network wait services for faster boot
|
# Disable network wait services for faster boot
|
||||||
@@ -1216,23 +1223,27 @@ EOF
|
|||||||
systemctl enable console-getty.service &>/dev/null || true
|
systemctl enable console-getty.service &>/dev/null || true
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Fedora/RHEL: /etc/profile.d/vte.sh sets a PROMPT_COMMAND that, combined
|
# Fedora/RHEL: /etc/profile.d/vte*.sh sets a PROMPT_COMMAND that, combined
|
||||||
# with broken TIOCGWINSZ in LXC noVNC, causes CSI 6n responses to leak as
|
# with broken TIOCGWINSZ in LXC noVNC, causes CSI 6n responses to leak as
|
||||||
# "R;80R" garbage at the shell prompt. Disable by renaming (chmod -x is
|
# "R;80R" garbage at the shell prompt. Disable by renaming (chmod -x is
|
||||||
# ineffective; /etc/profile sources by readability, not executable bit).
|
# ineffective; /etc/profile sources by readability, not executable bit).
|
||||||
for _f in /etc/profile.d/vte.sh /etc/profile.d/vte.csh; do
|
# Versioned names exist on Fedora 43+ (vte-2.91.sh).
|
||||||
[[ -f "$_f" ]] && mv "$_f" "${_f}.disabled" 2>/dev/null || true
|
shopt -s nullglob
|
||||||
|
for _f in /etc/profile.d/vte*.sh /etc/profile.d/vte*.csh; do
|
||||||
|
mv "$_f" "${_f}.disabled" 2>/dev/null || true
|
||||||
done
|
done
|
||||||
|
shopt -u nullglob
|
||||||
|
|
||||||
# LXC pseudo-tty often reports winsize 0x0; bash readline then falls back
|
# LXC pseudo-tty often reports winsize 0x0; bash readline then falls back
|
||||||
# to CSI 6n cursor-position queries whose responses leak as input. Force
|
# to CSI 6n cursor-position queries whose responses leak as input.
|
||||||
# a sane default size at every shell start until a real size is detected.
|
# Setting COLUMNS/LINES + stty makes readline skip the query entirely.
|
||||||
cat >/etc/profile.d/00-lxc-term-size.sh <<'EOF'
|
cat >/etc/profile.d/00-lxc-term-size.sh <<'EOF'
|
||||||
# community-scripts: ensure sane terminal size in LXC console
|
# community-scripts: ensure sane terminal size in LXC console
|
||||||
if [ -t 0 ] && [ -t 1 ]; then
|
if [ -t 0 ] && [ -t 1 ]; then
|
||||||
_sz=$(stty size 2>/dev/null)
|
_sz=$(stty size 2>/dev/null)
|
||||||
if [ -z "$_sz" ] || [ "${_sz% *}" = "0" ]; then
|
if [ -z "$_sz" ] || [ "${_sz% *}" = "0" ]; then
|
||||||
stty rows 24 cols 80 2>/dev/null
|
stty rows 24 cols 80 2>/dev/null
|
||||||
|
export LINES=24 COLUMNS=80
|
||||||
fi
|
fi
|
||||||
unset _sz
|
unset _sz
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user