From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Message-ID: <44422423.1020605@altlinux.ru> Date: Sun, 16 Apr 2006 14:01:55 +0300 From: Sviatoslav Sviridov User-Agent: Thunderbird 1.5 (X11/20051201) MIME-Version: 1.0 To: ALT Devel discussion list References: <20060414173705.14d0c0f1.pilot@altlinux.ru> <4440D6A7.6020604@altlinux.ru> In-Reply-To: <4440D6A7.6020604@altlinux.ru> X-Enigmail-Version: 0.93.2.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigD19C73B3F555D057EB6B11EE" Subject: Re: [devel] =?koi8-r?b?UTogL2V0Yy9uZXQgMC44IMkgQ29tcGFjdCAzLjA=?= X-BeenThere: devel@lists.altlinux.org X-Mailman-Version: 2.1.7 Precedence: list Reply-To: ALT Devel discussion list List-Id: ALT Devel discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Apr 2006 11:00:42 -0000 Archived-At: List-Archive: List-Post: This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigD19C73B3F555D057EB6B11EE Content-Type: multipart/mixed; boundary="------------070409060302050702070707" This is a multi-part message in MIME format. --------------070409060302050702070707 Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: base64 U3ZpYXRvc2xhdiBTdmlyaWRvdiDQydvF1DogCj4gLi4uCj4KPiDrwcvJxSDF3cUg09XdxdPU 18XOztnFIMnazcXOxc7J0SDC1cTV1CDXIDAuOC4wPyDwz8TP2tLF18HALCDe1M8gIsvPxCAK PiDM1d7bxSIgzc/WxdQgwtnU2CDQ0sneyc7PyiDQz9HXzMXOydEgzs/X2cggIs7FydPQ0sHX yc3ZyCDQ0sXJzdXdxdPU1yIgOykKPgo+IPcg3sHT1M7P09TJLCDNxc7RIMnO1MXSxdPVxdQg wtXE1dQgzMkgy8HLycUtzsnU2CDJ2sXOxc7J0SDXIN7B09TJIAo+INLBws/U2SDTIHBwd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1dGUgYSBqb2I/CkE6ICBGb3VyOyB0 aHJlZSB0byBob2xkIGl0IGRvd24sIGFuZCBvbmUgdG8gcmlwIGl0cyBoZWFkIG9mZi4KCg== --------------070409060302050702070707 Content-Type: text/x-patch; name="etcnet-smartroutes.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline; filename="etcnet-smartroutes.patch" --- /etc/net/scripts/functions.orig 2006-04-15 01:02:00 +0300 +++ /etc/net/scripts/functions 2006-04-16 13:42:21 +0300 @@ -4,7 +4,15 @@ [ -s "$optionsfile" ] && . $optionsfile done =20 -DENOISE=3D"egrep ^[^#]" +denoise() +{ + local line + [ -s "$1" ] && cat "$1"| while read line; do + eval "set -u;echo \"$line\"" 2>/dev/null + done|egrep -v '(^#|\$)' +} + +DENOISE=3D"denoise" =20 # Stolen from /etc/init.d/functions and improved. is_yes() --- /etc/net/scripts/config-ipv4.orig 2005-08-10 11:08:40 +0300 +++ /etc/net/scripts/config-ipv4 2006-04-16 12:50:23 +0300 @@ -75,6 +75,10 @@ config_routes_rules() { # setup routes local SRCFILE=3D`profiled_filename $MYIFACEDIR/ipv4route` + # get available device information + DEVINFO=3D`$IP addr show dev $NAME` + DEVCONFIG=3D`echo $DEVINFO|tr ' ' '\n'|awk -v force_mask=3D"$FORCE_NETM= ASK" -f $SCRIPTDIR/parse.awk` + eval "$DEVCONFIG" [ -s "$SRCFILE" ] && $DENOISE "$SRCFILE" | \ while read FIRST REST; do # If there is no operation, substitute default, otherwise keep. @@ -88,6 +92,12 @@ config_routes_rules() esac print_progress done +=09 + # Unset variables + DEVCONF_UNSET=3D`echo "$DEVCONFIG"|sed -e 's:^\([^=3D]*\)=3D.*:unset \1= :'` + eval "$DEVCONF_UNSET" + unset DEVCONF_UNSET + unset DEVCONFIG =20 # Setup rules only after routes are Ok, so that route tables are # already populated when rule starts routing traffic to them. --------------070409060302050702070707 Content-Type: text/plain; name="parse.awk" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline; filename="parse.awk" BEGIN { addr_num=3D0 } function get_mask(prefix, suffix) { if (prefix <=3D 0) return 0 if (prefix >=3D 32) return 0xffffffff suffix =3D 32 - prefix return lshift(rshift(0xffffffff, suffix), suffix) } function decode_mask(mask, m1, m2, m3, m4) { m1 =3D rshift(and(mask, 0xff000000), 24) m2 =3D rshift(and(mask, 0x00ff0000), 16) m3 =3D rshift(and(mask, 0x0000ff00), 8) m4 =3D and(mask, 0x000000ff) return sprintf("%d.%d.%d.%d", m1, m2, m3, m4) } /inet/ { getline ipaddr split(ipaddr, a, "/") printf "IPADDR%d=3D%s\n", ++addr_num, a[1] if ( length(force_mask) > 0 ) { printf "NETMASK%d=3D%s\n", addr_num, decode_mask(get_mask(force_mask)) } else if ( a[2] ) printf "NETMASK%d=3D%s\n", addr_num, decode_mask(get_mask(a[2])) } /peer/ { getline peer split(peer, p, "/") mask =3D get_mask(p[2]) printf "PEER_IPADDR%d=3D%s\n", addr_num, p[1] } --------------070409060302050702070707-- --------------enigD19C73B3F555D057EB6B11EE Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFEQiQm4A0qSNZP3T8RAtCMAKCKkR9posmV9W0W/AQwH9a408PuaACeL0oc 6gs50ivsG/lpUlWZF93Rx3o= =56OY -----END PGP SIGNATURE----- --------------enigD19C73B3F555D057EB6B11EE--