core: 安装 alpine 时也有 motd 提醒
This commit is contained in:
parent
def42d3277
commit
028b7bb8d9
16
trans.sh
16
trans.sh
@ -211,9 +211,18 @@ qemu_nbd() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
mod_motd() {
|
mod_motd() {
|
||||||
|
# 安装后 alpine 后要恢复默认
|
||||||
|
if [ "$distro" = alpine ]; then
|
||||||
|
cp /etc/motd /etc/motd.orig
|
||||||
|
# shellcheck disable=SC2016
|
||||||
|
echo 'mv /etc/motd.orig /etc/motd' |
|
||||||
|
insert_into_file /sbin/setup-disk after 'mount -t \$ROOTFS \$root_dev "\$SYSROOT"'
|
||||||
|
fi
|
||||||
|
|
||||||
cat <<EOF >/etc/motd
|
cat <<EOF >/etc/motd
|
||||||
Reinstalling...
|
Reinstalling...
|
||||||
Run "tail -f /reinstall.html" to view logs.
|
To view logs run:
|
||||||
|
tail -fn+1 /reinstall.html
|
||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1625,10 +1634,7 @@ if [ "$sleep" = 1 ]; then
|
|||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$distro" != "alpine" ]; then
|
mod_motd
|
||||||
mod_motd
|
|
||||||
fi
|
|
||||||
|
|
||||||
setup_tty_and_log
|
setup_tty_and_log
|
||||||
clear_previous
|
clear_previous
|
||||||
add_community_repo
|
add_community_repo
|
||||||
|
Loading…
Reference in New Issue
Block a user