Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 80019 Details for
Bug 122795
ppp0 without an IP address after loss of connection in persistent mode
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
Proposed ip-up script
ip-up (text/plain), 1.69 KB, created by
Alin Năstac (RETIRED)
on 2006-02-17 09:51:59 UTC
(
hide
)
Description:
Proposed ip-up script
Filename:
MIME Type:
Creator:
Alin Năstac (RETIRED)
Created:
2006-02-17 09:51:59 UTC
Size:
1.69 KB
patch
obsolete
>#!/bin/bash > ># this is a script which is executed after connecting the ppp interface. ># look at man pppd for details > ># the followings parameters are available: ># $1 = interface-name ># $2 = tty-device ># $3 = speed ># $4 = local-IP-address ># $5 = remote-IP-address ># $6 = ipparam > >#Block another instance of "ip-up_or_down $this_interface ..." >#during the execution of this script >LOCKFILE="/var/lock/updown-$1.pid" >if [ -f "${LOCKFILE}" ] ; then > OTHERPID=$(<"${LOCKFILE}") > if [ -n "${OTHERPID}" ]; then > while ps -p "${OTHERPID}" -o cmd | egrep -q "/etc/ppp/ip-(up|down) $1" ; do > sleep 1s > done > fi >fi >echo $$ > "${LOCKFILE}" > >#Support for the new Gentoo baselayout >[ -f /sbin/functions.sh ] && source /sbin/functions.sh >if [ -x "${svclib}/net.modules.d/helpers.d/pppd-wrapper" ] && > [ -x "/etc/init.d/net.$1" ] ; then > > ${svclib}/net.modules.d/helpers.d/pppd-wrapper up $1 > >elif [ "$USEPEERDNS" ]; then > > # add the server supplied DNS entries to /etc/resolv.conf > # (taken from debian's 0000usepeerdns) > > # follow any symlink to find the real file > REALRESOLVCONF=$(readlink --canonicalize /etc/resolv.conf) > > if [ "$REALRESOLVCONF" != "/etc/ppp/resolv.conf" ]; then > > # merge the new nameservers with the other options from the old configuration > { > grep --invert-match '^nameserver[[:space:]]' $REALRESOLVCONF > cat /etc/ppp/resolv.conf > } > $REALRESOLVCONF.tmp > > # backup the old configuration and install the new one > cp -dpP $REALRESOLVCONF $REALRESOLVCONF.pppd-backup > mv $REALRESOLVCONF.tmp $REALRESOLVCONF > > # correct permissions > chmod 0644 /etc/resolv.conf > chown root:root /etc/resolv.conf > > fi > >fi > >[ -f /etc/ppp/ip-up.local ] && . /etc/ppp/ip-up.local "$@" > >#Remove the lock file >rm "${LOCKFILE}"
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 Raw
Actions:
View
Attachments on
bug 122795
:
79759
|
80019
|
80039
|
86250