
Я пытался исправить файлы motd .d, чтобы они отображались при загрузке SSH на моем устройстве Android, и я воспользовался онлайн-руководством, чтобы попытаться исправить их.
Теперь я не могу проверить их, набрав текст, run-parts /etc/update-motd.d
потому что постоянно получаю следующие ошибки.
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
run-parts: failed to exec /etc/update-motd.d/10-sysinfo: Exec format error
run-parts: /etc/update-motd.d/10-sysinfo exited with return code 1
run-parts: failed to exec /etc/update-motd.d/90-footer: Exec format error
run-parts: /etc/update-motd.d/90-footer exited with return code 1
Набираю текст systemctl status motd
и получаю это на экране
motd.service
Loaded: masked (/dev/null; bad)
Active: inactive (dead)
Содержимое файла /etc/update-motd.d/
:
/etc/update-motd.d/00-header: ASCII text
/etc/update-motd.d/10-sysinfo: ASCII text
/etc/update-motd.d/90-footer: ASCII text
Выходls -l /etc/update-motd.d/
-rwxr-xr-x 1 root root 1429 Jun 9 14:22 00-header
-rwxr-xr-x 1 root root 1927 Jun 9 14:25 10-sysinfo
-rwxr-xr-x 1 root root 2205 Jun 9 14:29 90-footer
решение1
У меня на самом деле была та же проблема, и моя ошибка была очень простой:
я забыл#!/bin/sh