{"id":18633,"date":"2014-11-29T06:34:17","date_gmt":"2014-11-28T22:34:17","guid":{"rendered":"https:\/\/2blog.ilc.edu.tw\/25793\/2014\/11\/29\/cubie-truck-%e6%b8%ac%e8%a9%a6-arch-linux-%e9%96%8b%e6%a9%9f%e5%9f%b7%e8%a1%8c%e7%9a%84%e6%aa%94%e6%a1%88\/"},"modified":"2021-03-18T17:24:12","modified_gmt":"2021-03-18T09:24:12","slug":"cubie-truck-%e6%b8%ac%e8%a9%a6-arch-linux-%e9%96%8b%e6%a9%9f%e5%9f%b7%e8%a1%8c%e7%9a%84%e6%aa%94%e6%a1%88","status":"publish","type":"post","link":"https:\/\/2blog.ilc.edu.tw\/25793\/2014\/11\/29\/cubie-truck-%e6%b8%ac%e8%a9%a6-arch-linux-%e9%96%8b%e6%a9%9f%e5%9f%b7%e8%a1%8c%e7%9a%84%e6%aa%94%e6%a1%88\/","title":{"rendered":"Cubie Truck \u6e2c\u8a66 &#8211; Arch Linux \u958b\u6a5f\u57f7\u884c\u7684\u6a94\u6848"},"content":{"rendered":"<p>\u5728 Fedora \/ CentOS Linux\u00a0\u53ef\u4ee5\u5728<span style=\"color: #0000ff\"> \/etc\/rc.d\/rc.local<\/span>\uff0c\u5728 Debian \/ Ubuntu Linux\u00a0\u53ef\u4ee5\u5728<span style=\"color: #0000ff\"> \/etc\/rc.local<\/span>\u00a0\u4e2d\u8a2d\u5b9a\u958b\u6a5f\u8981\u57f7\u884c\u7684\u4e00\u4e9b\u529f\u80fd\uff0c\u5982\uff1a\u9632\u706b\u7246\u7684\u8a2d\u5b9a\u4e4b\u985e\u7684\u529f\u80fd\uff0c\u4e0d\u904e\u5728 Arch Linux\u00a0\u4e2d\u4f3c\u4e4e\u6c92\u6709\u9019\u4e00\u500b\u6a94\u6848\u7684\u5b58\u5728\uff0c\u4f46\u53ef\u4ee5\u7528\u66ff\u4ee3\u7684\u65b9\u5f0f\uff0c\u9054\u5230\u9019\u7a2e\u529f\u80fd\u3002<br \/>\u53c3\u8003\u7db2\u9801\uff1a<br \/><a href=\"http:\/\/www.yumao.name\/read\/archlinux-systemd-rc-local\/\" target=\"_blank\" rel=\"noopener noreferrer\">ArchLinux Systemd \u589e\u52a0rc-local\u81ea\u8fd0\u884c \u2013 \u7fbd\u6bdb\u306e\u5bb6<\/a><br \/><a href=\"http:\/\/superuser.com\/questions\/278396\/systemd-does-not-run-etc-rc-local\" target=\"_blank\" rel=\"noopener noreferrer\">arch linux &#8211; systemd does not run \/etc\/rc.local? &#8211; Super User<\/a><br \/><a href=\"http:\/\/www.fanninger.at\/thomas\/blog\/2014\/05\/install-arch-linux-on-cubietruck-cubieboard-3\/\" target=\"_blank\" rel=\"noopener noreferrer\">Install Arch Linux on Cubietruck (Cubieboard 3) | Tom&#8217;s blog<\/a><\/p>\n<p>\u65b9\u6cd5\u4e00\uff1a<br \/># <span style=\"color: #ff0000\">vim \/usr\/lib\/systemd\/system\/rc-local.service<\/span><br \/><span style=\"color: #0000ff\">[Unit]<\/span><br \/><span style=\"color: #0000ff\">Description=\/etc\/rc.local Compatibility<\/span><br \/><span style=\"color: #0000ff\">ConditionPathExists=\/etc\/rc.local<\/span><br \/><span style=\"color: #0000ff\">[Service]<\/span><br \/><span style=\"color: #0000ff\">Type=forking<\/span><br \/><span style=\"color: #0000ff\">ExecStart=\/etc\/rc.local<\/span><br \/><span style=\"color: #0000ff\">TimeoutSec=0<\/span><br \/><span style=\"color: #0000ff\">StandardOutput=tty<\/span><br \/><span style=\"color: #0000ff\">RemainAfterExit=yes<\/span><br \/><span style=\"color: #0000ff\">SysVStartPriority=99<\/span><br \/><span style=\"color: #0000ff\">[Install]<\/span><br \/><span style=\"color: #0000ff\">WantedBy=multi-user.target<\/span>[@more@]\u958b\u6a5f\u6642\u555f\u52d5 rc.local\u00a0\u6b64\u9805\u529f\u80fd<br \/># <span style=\"color: #ff0000\">systemctl enable rc-local.service<\/span><br \/><span style=\"color: #0000ff\">ln -s &#8216;\/usr\/lib\/systemd\/system\/rc-local.service&#8217; &#8216;\/etc\/systemd\/system\/multi-user.target.wants\/rc-local.service&#8217;<\/span><\/p>\n<p>\u5efa\u7acb<span style=\"color: #0000ff\"> \/etc\/rc.local<\/span> <br \/>\u95dc\u9589 Cubie Truck\u00a0\u4e0a\u7684 LED\u00a0\u71c8\u865f<br \/># <span style=\"color: #ff0000\">vim \/etc\/rc.local<\/span><br \/><span style=\"color: #0000ff\">#!\/bin\/sh<\/span><br \/><span style=\"color: #0000ff\">echo 0 &gt; \/sys\/class\/leds\/blue:ph21:led1\/brightness<\/span><br \/><span style=\"color: #0000ff\">echo 0 &gt; \/sys\/class\/leds\/orange:ph20:led2\/brightness<\/span><br \/><span style=\"color: #0000ff\">echo 0 &gt; \/sys\/class\/leds\/white:ph11:led3\/brightness<\/span><br \/><span style=\"color: #0000ff\">echo 0 &gt; \/sys\/class\/leds\/green:ph07:led4\/brightness<\/span><\/p>\n<p>\u66f4\u6539\u6a94\u6848\u57f7\u884c\u6b0a\u9650<br \/># <span style=\"color: #ff0000\">chmod +x \/etc\/rc.local<\/span><\/p>\n<p>\u65b9\u6cd5\u4e8c\uff1a<br \/># <span style=\"color: #ff0000\">vim \/usr\/bin\/cubietruck_leds_off.sh<\/span><br \/><span style=\"color: #0000ff\">#!\/bin\/sh<\/span><br \/><span style=\"color: #0000ff\">echo 0 &gt; \/sys\/class\/leds\/blue:ph21:led1\/brightness<\/span><br \/><span style=\"color: #0000ff\">echo 0 &gt; \/sys\/class\/leds\/orange:ph20:led2\/brightness<\/span><br \/><span style=\"color: #0000ff\">echo 0 &gt; \/sys\/class\/leds\/white:ph11:led3\/brightness<\/span><br \/><span style=\"color: #0000ff\">echo 0 &gt; \/sys\/class\/leds\/green:ph07:led4\/brightness<\/span><\/p>\n<p>\u66f4\u6539\u6a94\u6848\u57f7\u884c\u6b0a\u9650<br \/># <span style=\"color: #ff0000\">chmod +x \/usr\/bin\/cubietruck_leds_off.sh<\/span><\/p>\n<p># <span style=\"color: #ff0000\">vim \/etc\/systemd\/system\/cubietruck_leds_off.service<\/span><br \/><span style=\"color: #0000ff\">[Unit]<\/span><br \/><span style=\"color: #0000ff\">Description=Disable the LEDs of Cubietruck<\/span><br \/><span style=\"color: #0000ff\">[Service]<\/span><br \/><span style=\"color: #0000ff\">ExecStart=\/usr\/bin\/cubietruck_leds_off.sh<\/span><br \/><span style=\"color: #0000ff\">[Install]<\/span><br \/><span style=\"color: #0000ff\">WantedBy=multi-user.target<\/span><\/p>\n<p>\u555f\u52d5 cubietruck_leds_off\u00a0\u529f\u80fd<br \/># <span style=\"color: #ff0000\">systemctl start cubietruck_leds_off<\/span><\/p>\n<p>\u8a2d\u5b9a\u958b\u6a5f\u6642\u555f\u52d5<br \/># <span style=\"color: #ff0000\">systemctl enable cubietruck_leds_off<\/span><br \/><span style=\"color: #0000ff\">ln -s &#8216;\/etc\/systemd\/system\/cubietruck_leds_off.service&#8217; &#8216;\/etc\/systemd\/system\/multi-user.target.wants\/cubietruck_leds_off.service&#8217;<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5728 Fedora \/ CentOS Linux\u00a0\u53ef\u4ee5\u5728 \/etc\/rc.d\/rc.local\uff0c\u5728 Debian &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/2blog.ilc.edu.tw\/25793\/2014\/11\/29\/cubie-truck-%e6%b8%ac%e8%a9%a6-arch-linux-%e9%96%8b%e6%a9%9f%e5%9f%b7%e8%a1%8c%e7%9a%84%e6%aa%94%e6%a1%88\/\" class=\"more-link\">\u95b1\u8b80\u5168\u6587<span class=\"screen-reader-text\">\u3008Cubie Truck \u6e2c\u8a66 &#8211; Arch Linux \u958b\u6a5f\u57f7\u884c\u7684\u6a94\u6848\u3009<\/span><\/a><\/p>\n","protected":false},"author":55,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[167,170],"tags":[],"class_list":["post-18633","post","type-post","status-publish","format-standard","hentry","category-c-84386","category-c-85297"],"meta_key":{"_pingme":["1"],"_encloseme":["1"],"lt_post_id":["523096"]},"_links":{"self":[{"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/posts\/18633"}],"collection":[{"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/users\/55"}],"replies":[{"embeddable":true,"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/comments?post=18633"}],"version-history":[{"count":1,"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/posts\/18633\/revisions"}],"predecessor-version":[{"id":20255,"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/posts\/18633\/revisions\/20255"}],"wp:attachment":[{"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/media?parent=18633"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/categories?post=18633"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/tags?post=18633"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}