softgyn
(usa Debian)
Enviado em 21/10/2020 - 12:59h
Pessoal, instalei o Debian 10 num micro aqui, e estou tendo dificuldade em ativar/inicializar o rc.local, seguindo as dicas de varios usuarios, acabei copiando o conteudo do rc-local.service e do rc.local, mas ele simplesmente nao ativa, irei colar aqui em baixo o conteudo do rc-local.service primeiro, logo depois o conteudo do rc.local, e em seguida o resultado do comando systemctl status rc-local, como segue entao:
rc-local.service (em: /etc/systemd/system)
[Unit]
Description=/etc/rc.local compatibility
ConditionPathExists=/etc/rc.local
[Service]
Type=forking
ExecStart=/etc/rc.local start
TimeoutSec=0
StandardOutput=tty
RemainAfterExit=yes
SysVStartPriority=99
[Install]
WantedBy=multi-user.target
agora o rc.local (em /etc)
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
exit 0
agora o resultado do comando systemctl status rc-local
● rc-local.service - /etc/rc.local compatibility
Loaded: loaded (/etc/systemd/system/rc-local.service; enabled; vendor preset: enabled)
Drop-In: /usr/lib/systemd/system/rc-local.service.d
└─debian.conf
Active: failed (Result: exit-code) since Wed 2020-10-21 12:12:10 -03; 31min ago
out 21 12:12:10 debian systemd[1]: Starting /etc/rc.local compatibility...
out 21 12:12:10 debian rc.local[837]: /bin/sh: 0: Illegal option -
out 21 12:12:10 debian systemd[1]: rc-local.service: Control process exited, code=exited, status=2/INVALIDARGUMENT
out 21 12:12:10 debian systemd[1]: rc-local.service: Failed with result 'exit-code'.
out 21 12:12:10 debian systemd[1]: Failed to start /etc/rc.local compatibility.
out 21 12:34:12 debian systemd[1]: /etc/systemd/system/rc-local.service:10: Support for option SysVStartPriority= has been removed and it is ignored
out 21 12:34:12 debian systemd[1]: /etc/systemd/system/rc-local.service:10: Support for option SysVStartPriority= has been removed and it is ignored
out 21 12:34:13 debian systemd[1]: /etc/systemd/system/rc-local.service:10: Support for option SysVStartPriority= has been removed and it is ignored
ja tentei de tudo, mas ele so fica dando como falhou a iniciar
A intencao é iniciar um script firewall automaticamente, mas o rc.local foi removido desde a versao 9, se alguem tiver outra dica que funcione, por favor...
Alguem pode, por favor me ajudar
Obrigado