/etc/rc.local not performing in Linux Raspberry Pi

Source: Internet
Author: User

Recent research has developed Java programs embedded in the Raspberry Pi and intends to communicate with Salesforce. Need to develop a Java Web server, do not want to be so complicated, so I intend to write in the Linux system/etc/rc.local want to execute the statement, such as Java–jar/root/test.jar. But when the boot, found/etc/rc.local inside the command and did not execute, this is a headache thing. For the first time, I was thinking about some of the statements that might be inside, like service isc-dhcp-server start. This type of service-opening statement, if the DHCP service is opened before the HOSTAPD service is turned on, will it fail because of sequencing. So I add the statement after the >/etc/sys.log to the cause of the failure to output to the log file, but after the boot found that there is no such file, and the statement is indeed not executed, it seems that this conjecture is not correct. The information was searched on the internet. The execution order of the/etc/rc.local is the last, that is, after all the underlying services are opened, the rc.local file is executed, then the login program, and therefore does not exist because my statement execution failed because of a service's open failure.

If your program also has such a situation, the estimate and I met is similar.

EXECUTE as follows:

[[email protected]~]# ls –l /etc/rc.local

-rw-r--r--. 1 root root 477 6月  10 13:35 /etc/rc.local

发现原来是文件没有执行权限, the content is executed as described

chmod+x /etc/rc.local

Reboot found/etc/rc.local can execute, mother no longer have to worry about my boot task cannot execute

/etc/rc.local not performing in Linux Raspberry Pi

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.