1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml">
5 <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" />
7 D.28. /etc/sysconfig/network-devices/services/ipv4-static-route
9 <link rel="stylesheet" href="../stylesheets/lfs.css" type="text/css" />
10 <meta name="generator" content="DocBook XSL Stylesheets V1.73.2" />
11 <link rel="stylesheet" href="../stylesheets/lfs-print.css" type=
12 "text/css" media="print" />
14 <body class="lfs" id="lfs-6.8">
15 <div class="navheader">
17 Linux From Scratch - Version 6.8
20 付録 D. ブートスクリプトと sysconfig スクリプト version-20100627
24 <a accesskey="p" href="apds27.html" title=
25 "/etc/sysconfig/network-devices/services/ipv4-static">前のページ</a>
27 /etc/sysconfig/network-devices/services/ipv4-static
31 <a accesskey="n" href="udev-rules.html" title=
32 "Udev 設定ルール">次のページ</a>
38 <a accesskey="u" href="scripts.html" title=
39 "付録 D. ブートスクリプトと sysconfig スクリプト version-20100627">上に戻る</a>
42 <a accesskey="h" href="../index.html" title=
43 "Linux From Scratch - Version 6.8">ホーム</a>
47 <div class="wrap" lang="ja" xml:lang="ja">
49 <a id="ipv4route" name="ipv4route"></a>D.28.
50 /etc/sysconfig/network-devices/services/ipv4-static-route
54 ########################################################################
55 # Begin $network_devices/services/ipv4-static-route
57 # Description : IPV4 Static Route Script
59 # Authors : Kevin P. Fleming - kpfleming@linuxfromscratch.org
65 ########################################################################
79 args="${args} default"
89 args="${args} unreachable"
94 boot_mesg "Unknown route type (${TYPE}) in ${IFCONFIG}, cannot continue." ${FAILURE}
100 if [ -n "${need_ip}" ]; then
101 if [ -z "${IP}" ]; then
102 boot_mesg "IP variable missing from ${IFCONFIG}, cannot continue." ${FAILURE}
107 if [ -z "${PREFIX}" ]; then
108 boot_mesg "PREFIX variable missing from ${IFCONFIG}, cannot continue." ${FAILURE}
113 args="${args} ${IP}/${PREFIX}"
114 desc="${desc}${IP}/${PREFIX}"
117 if [ -n "${need_gateway}" ]; then
118 if [ -z "${GATEWAY}" ]; then
119 boot_mesg "GATEWAY variable missing from ${IFCONFIG}, cannot continue." ${FAILURE}
123 args="${args} via ${GATEWAY}"
126 if [ -n "${SOURCE}" ]; then
127 args="${args} src ${SOURCE}"
132 boot_mesg "Adding '${desc}' route to the ${1} interface..."
133 ip route add ${args} dev ${1}
138 boot_mesg "Removing '${desc}' route from the ${1} interface..."
139 ip route del ${args} dev ${1}
144 echo "Usage: ${0} [interface] {up|down}"
149 # End $network_devices/services/ipv4-static-route
152 <div class="navfooter">
155 <a accesskey="p" href="apds27.html" title=
156 "/etc/sysconfig/network-devices/services/ipv4-static">前のページ</a>
158 /etc/sysconfig/network-devices/services/ipv4-static
162 <a accesskey="n" href="udev-rules.html" title=
163 "Udev 設定ルール">次のページ</a>
169 <a accesskey="u" href="scripts.html" title=
170 "付録 D. ブートスクリプトと sysconfig スクリプト version-20100627">上に戻る</a>
173 <a accesskey="h" href="../index.html" title=
174 "Linux From Scratch - Version 6.8">ホーム</a>