JavaScript must be enabled in order for you to see "WP Copy Data Protect" effect. However, it seems JavaScript is either disabled or not supported by your browser. To see full result of "WP Copy Data Protector", enable JavaScript by changing your browser options, then try again.

在Fedora Core 17上面怎麼找不到/etc/rc.local?


提到/etc/rc.local,在Linux的世界(無論是哪種Distribution)裡,有點Common Sense的人都知道他的好處,連Cracker都喜歡駭進別人家裡面改這個檔案,而且Sys V與Upstart都跑不過這個檔案,因此這個設定檔是非常重要的,但是在FC17用Systemd模式開機的OS內怎麼都找不到這個檔案,原來是被System收進來且改到/etc/rc.d的目錄內了,所以廢話不多說,直接做一次就知道了,如下:

1) 自行建立/etc/rc.d/rc.local會在啟動時產生/tmp.rc.test檔案(預設系統沒有這個設定檔)
#vi /etc/rc.d/rc.local
#! /bin/bash
echo "I am working rc.local" > /tmp/rc.test

2) 將該設定檔賦予執行的權限
#chmod 755 /etc/rc.d/rc.local

3) 若習慣之前的使用方式,做Symbolinc Link到/etc目錄內
#ln -s /etc/rc.d/rc.local /etc/

4) 重開機並作驗證是否有產生/tmp/rc.test
#reboot
#cat /tmp/rc.test
I am working rc.local

5) 透過Systemd檢視rc-local的狀態
#systemctl status rc-local.service
rc-local.service - /etc/rc.d/rc.local Compatibility
Loaded: loaded (/usr/lib/systemd/system/rc-local.service; static)
Active: active (exited) since Sat, 16 Jun 2012 00:25:50 +0800; 3min 41s ago
Process: 635 ExecStart=/etc/rc.d/rc.local start (code=exited, status=0/SUCCESS)
CGroup: name=systemd:/system/rc-local.service

◎這樣以後就可以直接去編輯/etc/rc.local就可以達到啟動時執行的效果囉,很簡單吧,大完收工!

Leave a Comment


NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

 
This site is protected by WP-CopyRightPro