Skip to content

Commit

Permalink
Improve locale setup
Browse files Browse the repository at this point in the history
  • Loading branch information
nekorouter committed Jan 11, 2024
1 parent a0175bd commit ac852fc
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions mkrootfs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,10 @@ EOF
fi

# Set locale to en_US.UTF-8 UTF-8
chroot "$CHROOT_TARGET" sh -c "echo 'en_US.UTF-8 UTF-8' >> /etc/locale.gen"
chroot "$CHROOT_TARGET" sh -c "locale-gen"
chroot "$CHROOT_TARGET" sh -c "echo 'locales locales/default_environment_locale select en_US.UTF-8' | debconf-set-selections"
chroot "$CHROOT_TARGET" sh -c "echo 'locales locales/locales_to_be_generated multiselect en_US.UTF-8 UTF-8' | debconf-set-selections"
chroot "$CHROOT_TARGET" sh -c "rm /etc/locale.gen"
chroot "$CHROOT_TARGET" sh -c "dpkg-reconfigure --frontend noninteractive locales"

# Set default timezone to Asia/Shanghai
chroot "$CHROOT_TARGET" sh -c "ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime"
Expand Down

0 comments on commit ac852fc

Please sign in to comment.