diff --git a/misc/install.func b/misc/install.func index d087af57..2c74a2ce 100644 --- a/misc/install.func +++ b/misc/install.func @@ -1135,6 +1135,23 @@ echo -e "${YW:-} Hostname: ${GN:-}\$(hostname)${CL:-}" echo -e "${YW:-} IP Address: ${GN:-}\$(hostname -I 2>/dev/null | awk '{print \$1}' || ip -4 addr show scope global | awk '/inet /{print \$2}' | cut -d/ -f1 | head -1)${CL:-}" echo -e "${YW:-} Repository: ${GN:-}https://github.com/community-scripts/ProxmoxVED${CL:-}" echo "" +EOF + # openSUSE's /etc/bash.bashrc sources profile.d via `[ -x ]`, not `[ -r ]`, + # so the MOTD script must be executable to be loaded on every distro. + chmod +x "$PROFILE_FILE" + + # Belt-and-suspenders: also write a static /etc/motd. PAM's pam_motd reads + # this on every login regardless of how /etc/profile.d is sourced, so the + # MOTD is shown even on distros where bash login profile loading is quirky + # (Fedora, Arch, openSUSE, etc.). Static fields only — dynamic IP/hostname + # come from the profile.d script above when it's sourced. + cat >/etc/motd <