관례대로 나는 질문 직후 내 자신의 문제에 대한 답을 발견했다. :) http://grokbase.com/t/centos/centos/099bmc07mq/persisting-iproute2-routes-and-rules
Redhat 5 이상에서 /etc/sysconfig/network-scripts/ifup-routes
스크립트는 rule-*
파일을 처리 합니다. 아래 관련 코드 :
# Routing rules
FILES="/etc/sysconfig/network-scripts/rule-$1"
if [ -n "$2" -a "$2" != "$1" ]; then
FILES="$FILES /etc/sysconfig/network-scripts/rule-$2"
fi
for file in $FILES; do
if [ -f "$file" ]; then
{ cat "$file" ; echo ; } | while read line; do
if [[ ! "$line" =~ $MATCH ]]; then
/sbin/ip rule add $line
fi
done
fi
done
RHEL 6.5 용 스크립트 (6 세 이상) :
# Routing rules
FILES="/etc/sysconfig/network-scripts/rule-$1 /etc/sysconfig/network-scripts/rule6-$1"
if [ -n "$2" -a "$2" != "$1" ]; then
FILES="$FILES /etc/sysconfig/network-scripts/rule-$2 /etc/sysconfig/network-scripts/rule6-$2"
fi
for file in $FILES; do
if [ -f "$file" ]; then
handle_ip_file $file
fi
done
handle_ip_file() {
local f t type= file=$1 proto="-4"
f=${file##*/}
t=${f%%-*}
type=${t%%6}
if [ "$type" != "$t" ]; then
proto="-6"
fi
{ cat "$file" ; echo ; } | while read line; do
if [[ ! "$line" =~ $MATCH ]]; then
/sbin/ip $proto $type add $line
fi
done
}