ALT Linux Bugzilla
– Attachment 2318 Details for
Bug 11988
недоделки
New bug
|
Search
|
[?]
|
Help
Register
|
Log In
[x]
|
Forgot Password
Login:
[x]
|
EN
|
RU
[patch]
backend patch (+defroute)
net-pptp.patch (text/plain), 2.51 KB, created by
Michael Shigorin
on 2007-12-05 21:42:38 MSK
(
hide
)
Description:
backend patch (+defroute)
Filename:
MIME Type:
Creator:
Michael Shigorin
Created:
2007-12-05 21:42:38 MSK
Size:
2.51 KB
patch
obsolete
>--- net-pptp.orig 2007-04-05 10:10:51 +0300 >+++ net-pptp 2007-12-05 20:40:21 +0200 >@@ -67,6 +67,8 @@ > read_iface() > { > local name="/etc/net/ifaces/$1" && shift >+ local MPPE="#f" # mppe is off by default with pppd >+ grep -q '^require-mppe' "$name/pppoptions" && MPPE="#t" > > ( PPTP_SERVER= > REQUIRES= >@@ -76,20 +78,39 @@ > printf 'server "%s"' "$PPTP_SERVER" > printf 'iface "%s"' "$REQUIRES" > printf 'login "%s"' "$(grep '^user' "$name/pppoptions"|sed -r 's,user[[:space:]]*,,')" >+ printf 'mppe %s' "$MPPE" > echo ')' > > ) > } > >+set_mppe() >+{ >+ if [ -n "$in_mppe" ]; then >+ if [ "$in_mppe" = "#t" ]; then >+ MPPE_ADD="require-mppe" >+ MPPE_DEL="nomppe" >+ else >+ MPPE_ADD="nomppe" >+ MPPE_DEL="require-mppe" >+ fi >+ sed "/^$MPPE_ADD/d" -i "$name/pppoptions" ||: >+ if grep -q "^$MPPE_DEL" "$name/pppoptions"; then >+ sed "s,^$MPPE_DEL,$MPPE_ADD," -i "$name/pppoptions" ||: >+ else >+ echo "$MPPE_ADD" >> "$name/pppoptions" >+ fi >+ fi >+} >+ > write_iface() > { > [ "$1" = "/" ] && return > local name="/etc/net/ifaces/$1" >- prev_login="$(grep '^user' "$name/pppoptions"|sed -r 's,user[[:space:]]*,,')" >+ local prev_login="$(grep '^user' "$name/pppoptions"|sed -r 's,user[[:space:]]*,,')" > [ -d "$name" ] || mkdir "$name" > [ -n "$in_server" ] && shell_add_or_subst "PPTP_SERVER=" "$in_server" "$name/options" > [ -n "$in_iface" ] && shell_add_or_subst "REQUIRES=" "$in_iface" "$name/options" >- > if [ -n "$in_login" ] ;then > sed -r "s,^user[[:space:]].*,user $in_login," -i "$name/pppoptions" > sed -r "s,^$prev_login[[:space:]]*,$in_login ," -i "$chapfile" >@@ -100,8 +121,12 @@ > sed -r "s,^$prev_login[[:space:]].*,$prev_login * \"$in_password\" *," -i "$chapfile" > fi > >- "$ifdown" "$1" >- "$ifup" "$1" >+ set_mppe >+ >+ # NB: ifup (etcnet-0.9.4-alt1) would complain like this: >+ # ERROR: /sbin/ifup: Could not ifup dependency for interface 'ppp0' >+ # while eth0 would be perfectly up and working -- mike on 20071205 >+ ifdown "$1" && ifup "$1" > } > > new_iface() >@@ -118,6 +143,8 @@ > shell_add_or_subst "REQUIRES=" "$in_iface" "$name/options" > > shell_add_or_subst "user " "$in_login" "$name/pppoptions" >+ shell_add_or_subst "defaultroute" "" "$name/pppoptions" >+ set_mppe > > echo "$in_login * \"$in_password\" *" >>"$chapfile" > >@@ -130,7 +157,7 @@ > { > [ "$1" = "/" ] && return > local name="/etc/net/ifaces/$1" >- prev_login="$(grep '^user' "$name/pppoptions"|sed -r 's,user[[:space:]]*,,')" >+ local prev_login="$(grep '^user' "$name/pppoptions"|sed -r 's,user[[:space:]]*,,')" > > sed -r "/^$prev_login[[:space:]]/ d" -i "$chapfile" > rm -rf "$name"
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 11988
:
2316
|
2317
| 2318 |
2319