Install information in /etc/motd is misleading #204

Closed
opened 2026-02-04 17:07:28 +03:00 by OVERLORD · 2 comments
Owner

Originally created by @ehcloninger on GitHub (Dec 20, 2024).

Have you read and understood the above guidelines?

yes

📜 What is the name of the script you are using?

Calibre-Web LXC

📂 What was the exact command used to execute the script?

bash -c "$(wget -qLO - https://github.com/community-scripts/ProxmoxVE/raw/main/ct/calibre-web.sh)"

📝 Provide a clear and concise description of the issue.

On completion, the installer writes information into /etc/motd about the state of the machine on install. By default, it's set up to use DHCP. This is fine for install, but users may use a static IP or pre-assigned IP from DHCP for this home servers.

It was a bit confusing to go through the process of assigning an IP address and confirming it with "ip a" in the console, for the login message to show the initial IP address. Looking at misc/install.func, I see there's a static assignment of the IP address at the moment of installation and it's not using the runtime IP address. It appears this script is used on many of the installers, so this may have a wider impact.

I suggest to use hostname -I as the output from /etc/motd rather than the static value assigned at installation. Assuming hostname is guaranteed to exist in the host OS.

⚙️ What settings are you using?

  • Default Settings
  • Advanced Settings

🖥️ Which Linux distribution are you using?

Debian 12

🔄 Steps to reproduce the issue.

Issue the default command line with no advanced settings.
Use whatever method you prefer to set a static IP address (edit /etc/network/interfaces.d or use a static DHCP route based on MAC).
On start, /etc/motd is shown in the console.

Paste the full error output (if available).

There's not an error, it's misleading output. It's the output of this line in misc/install.sh

echo -e "${TAB}${INFO}${YW} IP Address: ${GN}${IP}${CL}" >> "$MOTD_FILE"

🖼️ Additional context (optional).

misc/install.sh line 224, or nearby

Originally created by @ehcloninger on GitHub (Dec 20, 2024). ### ✅ Have you read and understood the above guidelines? yes ### 📜 What is the name of the script you are using? Calibre-Web LXC ### 📂 What was the exact command used to execute the script? bash -c "$(wget -qLO - https://github.com/community-scripts/ProxmoxVE/raw/main/ct/calibre-web.sh)" ### 📝 Provide a clear and concise description of the issue. On completion, the installer writes information into /etc/motd about the state of the machine on install. By default, it's set up to use DHCP. This is fine for install, but users may use a static IP or pre-assigned IP from DHCP for this home servers. It was a bit confusing to go through the process of assigning an IP address and confirming it with "ip a" in the console, for the login message to show the initial IP address. Looking at misc/install.func, I see there's a static assignment of the IP address at the moment of installation and it's not using the runtime IP address. It appears this script is used on many of the installers, so this may have a wider impact. I suggest to use `hostname -I` as the output from /etc/motd rather than the static value assigned at installation. Assuming `hostname` is guaranteed to exist in the host OS. ### ⚙️ What settings are you using? - [X] Default Settings - [ ] Advanced Settings ### 🖥️ Which Linux distribution are you using? Debian 12 ### 🔄 Steps to reproduce the issue. Issue the default command line with no advanced settings. Use whatever method you prefer to set a static IP address (edit /etc/network/interfaces.d or use a static DHCP route based on MAC). On start, /etc/motd is shown in the console. ### ❌ Paste the full error output (if available). There's not an error, it's misleading output. It's the output of this line in misc/install.sh echo -e "${TAB}${INFO}${YW} IP Address: ${GN}${IP}${CL}" >> "$MOTD_FILE" ### 🖼️ Additional context (optional). misc/install.sh line 224, or nearby
Author
Owner

@michelroegl-brunner commented on GitHub (Dec 20, 2024):

The "Problem" is that install.func only runs during the creation of the lxc, not after the Fact. The modt gets written with the known IP at the time and the script dose not get run when you change the IP.

@michelroegl-brunner commented on GitHub (Dec 20, 2024): The "Problem" is that install.func only runs during the creation of the lxc, not after the Fact. The modt gets written with the known IP at the time and the script dose not get run when you change the IP.
Author
Owner

@MickLesk commented on GitHub (Dec 20, 2024):

Change motd manually. We dont Update this yet

@MickLesk commented on GitHub (Dec 20, 2024): Change motd manually. We dont Update this yet
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/ProxmoxVE#204