* [Comm] Static routes in /etc/sysconfig/static-routes
@ 2004-05-06 6:24 Eugene Prokopiev
2004-05-06 6:31 ` Dmitry Lebkov
0 siblings, 1 reply; 3+ messages in thread
From: Eugene Prokopiev @ 2004-05-06 6:24 UTC (permalink / raw)
To: community
Здравствуйте!
Решил оформить статические маршруты как положено в Альте.
Прочитав /usr/share/doc/initscripts-5.49/sysconfig.txt, написал следующее:
/etc/sysconfig/static-routes:
any net 192.168.10.0 netmask 255.255.255.0 gw 192.168.101.15
Теперь после запуска service network restart мне говорят:
Shutting down interface eth0:
[ OK ]
Shutting down interface eth1:
[ OK ]
Disabling IPv4 packet forwarding:
[ OK ]
Setting network parameters:
[ OK ]
Bringing up interface lo:
[ OK ]
Enabling IPv4 packet forwarding
[ OK ]
Bringing up interface eth0:
[ OK ]
Bringing up interface eth1:
[ OK ]
SIOCADDRT: No such device
Если в заголовок /etc/rc.d/init.d/network вписать -x, то вот где
возникает проблема:
+ '[' -f /etc/sysconfig/static-routes ']'
+ local ignore type dest netmask mask bogus args
+ grep '^any' /etc/sysconfig/static-routes
+ read ignore type dest netmask mask bogus args
+ '[' gw '!=' gw ']'
+ bogus=
+ /sbin/route add -net 192.168.10.0 netmask 255.255.255.0 192.168.101.15
SIOCADDRT: No such device
И вот соответствующий кусок из /etc/rc.d/init.d/network:
# Add non interface-specific static-routes.
if [ -f /etc/sysconfig/static-routes ]; then
local ignore type dest netmask mask bogus args
grep "^any" /etc/sysconfig/static-routes | while read
ignore type dest netmask mask bogus args; do
[ "$bogus" != gw ] || bogus=
/sbin/route add -$type $dest $netmask $mask
$bogus $args
done
fi
Теперь объясните, почему у меня "$bogus" != gw и как написать так, чтоб
было =
--
С уважением, Прокопьев Евгений
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Comm] Static routes in /etc/sysconfig/static-routes
2004-05-06 6:24 [Comm] Static routes in /etc/sysconfig/static-routes Eugene Prokopiev
@ 2004-05-06 6:31 ` Dmitry Lebkov
2004-05-06 6:42 ` [Comm] " Michael Shigorin
0 siblings, 1 reply; 3+ messages in thread
From: Dmitry Lebkov @ 2004-05-06 6:31 UTC (permalink / raw)
To: community
On Thu, 06 May 2004 10:24:47 +0400
Eugene Prokopiev <john@rmts.donpac.ru> wrote:
[skip]
> И вот соответствующий кусок из /etc/rc.d/init.d/network:
>
> # Add non interface-specific static-routes.
> if [ -f /etc/sysconfig/static-routes ]; then
> local ignore type dest netmask mask bogus args
> grep "^any" /etc/sysconfig/static-routes | while read
> ignore type dest netmask mask bogus args; do
> [ "$bogus" != gw ] || bogus=
^^^^^ должно быть - "gw".
Баг? В BTS его ... ;)
--
WBR, Dmitry Lebkov
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-05-06 6:42 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-05-06 6:24 [Comm] Static routes in /etc/sysconfig/static-routes Eugene Prokopiev
2004-05-06 6:31 ` Dmitry Lebkov
2004-05-06 6:42 ` [Comm] " Michael Shigorin
ALT Linux Community general discussions
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 community community/ http://lore.altlinux.org/community \
mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com
public-inbox-index community
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.community
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git