一般在 Linux 中,都有一個可以在開機後執行一些程式的設定檔,一般來說都叫做 rc.local,可能是位在 /etc 或 /etc/rc.d 的目錄之下,但也有一些 Linux 在新的版本中,逐漸捨棄這項功能,如果要使用這樣的功能,還要特別去設定。
在 Gentoo Linux 中,這一個設定檔,叫 local.start,位在 /etc/local.d 目錄之下
# vim /etc/local.d/local.start
#!/bin/bash
if [ -e /etc/firewall.server ] ;then
echo “Starting Firewall…”
sh /etc/firewall.server
fi
設定檔案執行權限
# chmod 700 /etc/local.d/local.start