Fix several issues
This commit is contained in:
parent
b5f7d77488
commit
4791a3f8a9
12
install.sh
12
install.sh
|
@ -228,8 +228,10 @@ setup_grub() {
|
|||
}
|
||||
|
||||
setup_users() {
|
||||
echo -n "Configuring users..."
|
||||
right_chroot /mnt useradd -m "$PERSONAL_USER"
|
||||
right_chroot /mnt echo -e "root:$ROOT_PASSWORD\n$PERSONAL_USER:$PERSONAL_PASSWORD" | chpasswd -q
|
||||
echo -e "root:$ROOT_PASSWORD\n$PERSONAL_USER:$PERSONAL_PASSWORD" | chpasswd -R /mnt
|
||||
echo "done"
|
||||
}
|
||||
|
||||
setup_network() {
|
||||
|
@ -255,11 +257,13 @@ ask_password() {
|
|||
stty -echo
|
||||
read USER_PASSWORD
|
||||
stty echo
|
||||
echo
|
||||
echo -n "Confirm password: "
|
||||
stty -echo
|
||||
local PASSWORD_CONFIRM
|
||||
read PASSWORD_CONFIRM
|
||||
stty echo
|
||||
echo
|
||||
if [ "$USER_PASSWORD" != "$PASSWORD_CONFIRM" ]; then
|
||||
echo "Wrong passwords. Please try again."
|
||||
ask_password $1
|
||||
|
@ -293,11 +297,11 @@ prompt_all() {
|
|||
|
||||
post_install() {
|
||||
curl -sL "$POST_INSTALL_SCRIPT" -o post-install.sh
|
||||
mv post-install /mnt/root
|
||||
chmod +x /mnt/root
|
||||
mv post-install.sh /mnt/root
|
||||
chmod +x /mnt/root/post-install.sh
|
||||
echo -n "Ready for post-install script. Press any key to continue..."
|
||||
read dummy
|
||||
right_chroot /root/post-install.sh
|
||||
right_chroot /mnt /root/post-install.sh
|
||||
}
|
||||
|
||||
configure() {
|
||||
|
|
|
@ -39,9 +39,10 @@ USER_OUT=""
|
|||
PACMAN_CONF="/etc/pacman.conf"
|
||||
PACMAN_TEMP_CONF="/tmp/pacman.conf"
|
||||
DOAS_CONF="/etc/doas.conf"
|
||||
DISTRO=$(lsb_release -is)
|
||||
DISTRO=$(cat /etc/os-release | sed -nE 's/^ID=(.*)/\1/p')
|
||||
INIT_SYS=$(basename $(readlink /bin/init))
|
||||
DEFAULT_INCLUDE='/etc/pacman.d/mirrorlist'
|
||||
if [ "$DISTRO" != "Arch" -a "$DISTRO" != "Artix" ]; then
|
||||
if [ "$DISTRO" != "arch" -a "$DISTRO" != "artix" ]; then
|
||||
echo "Error: $(lsb_release -ds) not supported"
|
||||
usage
|
||||
fi
|
||||
|
@ -403,7 +404,7 @@ install_doas() {
|
|||
|
||||
repos() {
|
||||
echo "Detected distro $DISTRO Linux. Proceeding with enabling more repositories."
|
||||
if [ "$DISTRO" = "Artix" ]; then
|
||||
if [ "$DISTRO" = "artix" ]; then
|
||||
pacman_repo lib32
|
||||
local ARCH_REPOS="$DEFAULT_INCLUDE-arch"
|
||||
install archlinux-mirrorlist
|
||||
|
|
Loading…
Reference in New Issue