
Estaba intentando arreglar los archivos motd .d para que se mostraran al iniciar ssh en mi dispositivo Android y utilicé un tutorial en línea para intentar arreglarlos.
Ahora no puedo probarlos escribiendo run-parts /etc/update-motd.d
porque sigo recibiendo los siguientes errores.
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
Al escribir systemctl status motd
aparece esto en mi pantalla
motd.service
Loaded: masked (/dev/null; bad)
Active: inactive (dead)
Contenido del archivo /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
Salida dels -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
Respuesta1
De hecho tuve el mismo problema y mi error fue muy simple:
me olvidé del#!/bin/sh