• notice
  • Congratulations on the launch of the Sought Tech site

rc.local on Centos7 does not execute when booting and git submits an error: warning: LF will be replaced by CRLF in.. problem

Some startup commands were added to the startup file /etc/rc.local on Centos7, but after several server restarts, it was found that the service did not start. Check it out today, and it is clearly written in the /etc/rc.local file that you need to have execution permission for this file.
# Please note that you must run 'chmod +x /etc/rc.d/rc.local' to ensure
lrwxrwxrwx 1 root root 13 Jan 12 2022 /etc/rc.local -> rc.d/rc.local
    and view directly If it is, the file path does have executable permission, but this file is a soft link, and the executed file does not have executable permission when further viewing, and this is the problem. Just add execute permissions.
    In addition, I encountered an error when submitting git: warning: LF will be replaced by CRLF in. The reason is that there is a symbol escape problem. The newline character in windows is CRLF, but the newline character in Linux is LF, so when executing add . When a prompt appears, the solution:
git config --global core.autocrlf false


Technical otaku

Sought technology together

Related Topic


Leave a Reply