mirror of
https://github.com/bin456789/reinstall.git
synced 2025-01-19 04:49:13 +08:00
alpine: 修复目标系统为 alpine liveos 时没显示用户名密码
This commit is contained in:
parent
b37a3800fc
commit
4d1ee409c5
20
reinstall.sh
20
reinstall.sh
@ -9,6 +9,7 @@ github_proxy=https://mirror.ghproxy.com/https://raw.githubusercontent.com
|
||||
export LC_ALL=C
|
||||
|
||||
# 处理部分用户用 su 切换成 root 导致环境变量没 sbin 目录
|
||||
# 不要漏了最后的 $PATH,否则会找不到 windows 系统程序例如 diskpart
|
||||
export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:$PATH
|
||||
|
||||
this_script=$(realpath "$0")
|
||||
@ -3036,6 +3037,17 @@ fi
|
||||
|
||||
info 'info'
|
||||
echo "$distro $releasever"
|
||||
|
||||
if ! { is_netboot_xyz || is_use_dd; }; then
|
||||
if [ "$distro" = windows ]; then
|
||||
username="administrator"
|
||||
else
|
||||
username="root"
|
||||
fi
|
||||
echo "Username: $username"
|
||||
echo "Password: 123@@@"
|
||||
fi
|
||||
|
||||
if is_netboot_xyz; then
|
||||
echo 'Reboot to start netboot.xyz.'
|
||||
elif is_alpine_live; then
|
||||
@ -3043,14 +3055,6 @@ elif is_alpine_live; then
|
||||
elif is_use_dd; then
|
||||
echo 'Reboot to start DD.'
|
||||
else
|
||||
if [ "$distro" = windows ]; then
|
||||
username="administrator"
|
||||
else
|
||||
username="root"
|
||||
fi
|
||||
|
||||
echo "Username: $username"
|
||||
echo "Password: 123@@@"
|
||||
echo "Reboot to start the installation."
|
||||
fi
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user