mirror of https://github.com/tteck/Proxmox.git
Update alpine-install.func
This commit is contained in:
parent
53cb9b00e4
commit
666bf44c85
|
@ -57,6 +57,10 @@ msg_error() {
|
||||||
|
|
||||||
setting_up_container() {
|
setting_up_container() {
|
||||||
msg_info "Setting up Container OS"
|
msg_info "Setting up Container OS"
|
||||||
|
echo "export HOME=/root" >>/root/.bashrc
|
||||||
|
echo "export TERM='xterm-256color'" >>/root/.bashrc
|
||||||
|
echo "cd ~" >>/root/.bashrc
|
||||||
|
. /root/.bashrc
|
||||||
while [ $i -gt 0 ]; do
|
while [ $i -gt 0 ]; do
|
||||||
if [ "$(ip addr show | grep 'inet ' | grep -v '127.0.0.1' | awk '{print $2}' | cut -d'/' -f1)" != "" ]; then
|
if [ "$(ip addr show | grep 'inet ' | grep -v '127.0.0.1' | awk '{print $2}' | cut -d'/' -f1)" != "" ]; then
|
||||||
break
|
break
|
||||||
|
@ -107,7 +111,6 @@ update_os() {
|
||||||
}
|
}
|
||||||
|
|
||||||
motd_ssh() {
|
motd_ssh() {
|
||||||
echo "export TERM='xterm-256color'" >>/root/.bashrc
|
|
||||||
echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" >/etc/motd
|
echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" >/etc/motd
|
||||||
if [[ "${SSH_ROOT}" == "yes" ]]; then
|
if [[ "${SSH_ROOT}" == "yes" ]]; then
|
||||||
$STD rc-update add sshd
|
$STD rc-update add sshd
|
||||||
|
@ -115,15 +118,3 @@ motd_ssh() {
|
||||||
$STD /etc/init.d/sshd start
|
$STD /etc/init.d/sshd start
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
customize() {
|
|
||||||
msg_info "Customizing Container"
|
|
||||||
bash -c "passwd -d root" >/dev/null 2>&1
|
|
||||||
msg_ok "Customized Container"
|
|
||||||
}
|
|
||||||
|
|
||||||
root() {
|
|
||||||
if ! getent shadow root | grep -q '^root:[^:]*:\?\$'; then
|
|
||||||
customize
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in New Issue