Почему тут не устанавливается и не отображается новый установленный мотд? [code]
- User
Почему тут не устанавливается и не отображается новый установленный мотд?
#!/bin/bash sudo rm -rf /etc/update-motd.d/* # Удаляем файл /etc/profile.d/motd.sh, если он существует if [ -f /etc/profile.d/motd.sh ]; then sudo rm -f /etc/profile.d/motd.sh fi sudo bash -c 'cat > /etc/update-motd.d/00-header <<EOF #!/bin/sh [ -r /etc/lsb-release ] && . /etc/lsb-release if [ -z "\$DISTRIB_DESCRIPTION" ] && [ -x /usr/bin/lsb_release ]; then # Fall back to using the very slow lsb_release utility DISTRIB_DESCRIPTION=\$(lsb_release -s -d) fi printf "Welcome to internalVM %s (%s %s %s)\n" "\$DISTRIB_DESCRIPTION" "\$(uname -o)" "\$(uname -r)" "\$(uname -m)" printf "\n" printf " * Best Hosting: https://cogrid.host\n" printf " * Best Ubuntu Administrator: https://t.me/dana56_callbot\n" printf " * Best Protection: https://internalguard.ru\n" printf "\n" EOF' sudo chmod +x /etc/update-motd.d/00-header echo "MOTD script успешно обновлён!" - Assistant
- User
Welcome to Ubuntu 22.04.2 LTS (GNU/Linux 5.15.0-75-generic x86_64)
- Documentation: https://help.ubuntu.com
- Management: https://landscape.canonical.com
- Support: https://ubuntu.com/advantage
This system has been minimized by removing packages and content that are not required on a system that users do not log into.
To restore this content, you can run the 'unminimize' command. Last login: Mon Dec 2 13:41:24 2024 from 93.171.47.226 root@catlavan:
# ls -l /etc/update-motd.d/00-header -rwxr-xr-x 1 root root 589 Dec 2 13:18 /etc/update-motd.d/00-header root@catlavan:# sudo run-parts /etc/update-motd.d/ > /etc/motd cat /etc/motd run-parts: failed to exec /etc/update-motd.d//00-header: Exec format error run-parts: /etc/update-motd.d//00-header exited with return code 1 - Assistant
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.