ArchLinux for Arm Raspberry Pi boot-up script rc.local

Source: Internet
Author: User

Today toss the next Raspberry Pi Thunder firmware, Thunderbolt installation is smooth, decompression directly run the portal is done, but since the start of the problem, due to the new version of the archlinux switch to SYSTEMD, Not only rc.conf province, and even Rc.local has not, so Google, after several attempts, with the following to determine the script can be started

Rc.local

#!/bin/sh#touch /test#xunlei/xunlei/portal

The above script refers to the start of the Thunderbolt, touch/test I used to test, if you want to know if the script is running, you can remove the comments

Next is the/usr/lib/systemd/system/rclocal.service file (this is the location of the ArchLinux, the other distributions may not be the same, but the basic is similar)

[Unit]description="/etc/rc.local compatibility"conditionpathexists =/etc/rc.localafter=Network.target[service]type=forkingexecstart=/etc/  Rc.localtimeoutsec=0standardinput=ttyremainafterexit=  Yessysvstartpriority=[Install]wantedby=multi-user.target

Don't ask me why I wrote it, check it myself! You need to know that it is OK to write scripts that are ready to run.

Then add power-on self-boot

Systemctl Enable Rclocal

Finally, you can reboot and check the status of this unit after rebooting.

Systemctl Status Rclocal
Rclocal.service-"/etc/rc.local Compatibility"   loaded:loaded (/usr/lib/systemd/system/rclocal.service; Enabled Vendor preset:disabled)   Active:active (running) since two 2016-01-05 13:52:46 CST; 49min ago   CGroup:/system.slice /rclocal.service           ├─232/xunlei/lib/etmdaemon/xunlei/lib/embedthundermanager/dev/null/dev/null **************           ├─234/xunlei/lib/embedthundermanager ***************************************** *           └─236/xunlei/lib/vod_httpserver1 month 13:52:41 Pi systemd[1]: Starting "/etc/rc.local Compatibility" ... January 13:52:46 Pi systemd[1]: Started "/etc/rc.local Compatibility". January 14:42:13 Pi systemd[1]: [/usr/lib/systemd/system /RCLOCAL.SERVICE:12] Support for option sysvstartpriority= have been remo ... ignoredhint:some lines were ellipsized, use- L-Show in full

OK, this is my unit status on the Raspberry Pi.

ArchLinux for Arm Raspberry Pi boot-up script rc.local

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.