

Hi, there seems to be some kind of problem/bug with pppd and openrc. I've noticed this when I tried to connect via my usb adsl modem. Anyway, net.ppp0 should contain updetach in ppp options, something like this should do the trickrek2 wrote:I mean why ppp0 does not come up?
maybe someone that worked on this can tell me were exactly to look to fix this.. and maybe add it to the upgrade procedure so
the few of us that tether our phones will not have this issue..
Code: Select all
pppd_ppp0=( "defaultroute usepeerdns noipdefault noauth holdoff 10 maxfail 0
persist asyncmap 0 lcp-echo-interval 2 lcp-echo-failure 7 receive-all debug updetach" )
Code: Select all
# /etc/init.d/net.eth0 start
* Checking local filesystems ...
Reiserfs super block in block 16 on 0x803 of format 3.6 with standard journal
Blocks (total/free): 60912/50690 by 4096 bytes
Filesystem is NOT clean
Partition /dev/sda3 is mounted with write permissions, cannot check it
(... a whole lot of this for every file system ...)
* Filesystems couldn't be fixed [ !! ]
* ERROR: fsck failed to start
* ERROR: cannot start root as fsck would not start
* ERROR: cannot start mtab as fsck would not start
* ERROR: cannot start net.eth0 as fsck would not start
Code: Select all
need localmount
after bootmisc
Code: Select all
# /etc/init.d/net.eth2 start
* Bringing up interface eth2
* Starting ifplugd on eth2 ... [ ok ]
* Backgrounding ...
* WARNING: net.eth2 not under our control, aborting
# ifconfig eth2
eth2 Link encap:Ethernet HWaddr xx:xx:xx:xx:xx:xx
inet addr:xx.xx.xx.xx Bcast:xx.xx.xx.xx Mask:xx.xx.xx.xx
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:73943 errors:0 dropped:0 overruns:0 frame:0
TX packets:37353 errors:0 dropped:0 overruns:0 carrier:0
collisions:7 txqueuelen:1000
RX bytes:47466735 (45.2 MiB) TX bytes:3000427 (2.8 MiB)
Code: Select all
# /etc/init.d/net.eth0 start
* Bringing up interface eth0
* Starting ifplugd on eth0 ... [ ok ]
* Backgrounding ...
* WARNING: net.eth0 has started, but is inactive
# ifconfig
eth0 Link encap:Ethernet HWaddr xx:xx:xx:xx:xx:xx
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:9 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:576 (576.0 B) TX bytes:0 (0.0 B)
Interrupt:24
Code: Select all
Apr 20 11:20:02 xx ifplugd(eth0)[3414]: ifplugd 0.28 initializing.
Apr 20 11:20:02 xx ifplugd(eth0)[3414]: Using interface eth0/xx:xx:xx:xx:xx:xx with driver <tg3> (version: 3.90)
Apr 20 11:20:02 xx ifplugd(eth0)[3414]: Using detection mode: SIOCETHTOOL
Apr 20 11:20:02 xx ifplugd(eth0)[3414]: Initialization complete, link beat not detected.
Apr 20 11:20:02 xx /etc/init.d/./net.eth0[3324]: WARNING: net.eth0 has started, but is inactive
Apr 20 11:20:04 xx [92404.087082] tg3: eth0: Link is up at 1000 Mbps, full duplex.
Apr 20 11:20:04 xx [92404.087093] tg3: eth0: Flow control is on for TX and on for RX.
Apr 20 11:20:05 xx ifplugd(eth0)[3414]: Link beat detected.
Apr 20 11:20:06 xx ifplugd(eth0)[3414]: Executing '/etc/ifplugd/ifplugd.action eth0 up'.
Apr 20 11:20:07 xx ifplugd(eth0)[3414]: client: Error: either "local" is duplicate, or "netmask" is a garbage.
Apr 20 11:20:07 xx ifplugd(eth0)[3414]: client: RTNETLINK answers: Network is unreachable
Apr 20 11:20:07 xx ifplugd(eth0)[3414]: Program executed successfully.
Apr 20 11:20:33 xx [92434.003045] e100: eth2: e100_watchdog: link up, 100Mbps, half-duplex
Apr 20 11:20:44 xx ifplugd(eth0)[3414]: Exiting.Code: Select all
modules="iproute2"
config_eth0="xx.xx.xx.xx broadcast xx.xx.xx.xx netmask xx.xx.xx.xx"
routes_eth0="default gw xx.xx.xx.xx"
modules_eth2="udhcpc"
config_eth2="dhcp"
Nah, the fsck bug might be necessary for other reasons later, but my problem is that trying to start eth0 or eth2 drags in a full system fsck, which is pointless on a running system.lightseeker wrote:@Felig: for fsck issue see this http://bugs.gentoo.org/show_bug.cgi?id=195988 and then edit /etc/conf.d/fsck as apropriate,
for eth0 see this post http://forums.gentoo.org/viewtopic-p-50 ... ml#5065939 and then it might be "safe" to reboot
On the other hand, switching broadcast and netmask did fix it. So thanks, and I apologize for doubting the idiocy of whoever wrote that script.lightseeker wrote:@Felig: for eth0 see this post http://forums.gentoo.org/viewtopic-p-50 ... ml#5065939 and then it might be "safe" to reboot

hmm I already have that option..maybe something else?Hi, there seems to be some kind of problem/bug with pppd and openrc. I've noticed this when I tried to connect via my usb adsl modem. Anyway, net.ppp0 should contain updetach in ppp options, something like this should do the trick
pppd will establish a connection, and openrc will issue a warning that interface is not under its control, but it'll work fineCode: Select all
pppd_ppp0=( "defaultroute usepeerdns noipdefault noauth holdoff 10 maxfail 0 persist asyncmap 0 lcp-echo-interval 2 lcp-echo-failure 7 receive-all debug updetach" )
Code: Select all
pppd $RFCOMM_DEVPATH/$RFCOMM_DEV 921600 connect '/usr/sbin/chat -s -v "" "AT&F0E0V1S0=0" OK ATD#777 CONNECT' $PPPD_QUIET updetach crtscts noipdefault novj lcp-echo-failure 0 nobs
dcomp novjccomp nopcomp noaccomp noauth user USERNAME modem usepeerdns defaultroute connect-delay 5000
Code: Select all
#!/bin/sh
#
# start-bt-modem: Start "dial-up networking" via Bluetooth with a Treo 700p.
# Paul Walmsley <paul@booyaka.com> 20071219
#
# For this script to work, you must already have paired your computer and
# the phone, and the computer should appear in the "trusted devices list"
# on your Treo.
#
# You'll need to change the PHONE_BT_ADDR variable to match your phone's
# Bluetooth address. To find this, set your Treo's Bluetooth visibility
# to "Temporary" and run 'hcitool scan' on your Linux box.
#
PHONE_BT_ADDR=00:07:E0:82:D3:04
#
hciconfig hci0 down
hciconfig hci0 up
/etc/init.d/bluetooth restart
#############################
#
# Items you are unlikely to need to change
#
# Bluetooth interface device name - run 'hciconfig' to find this
BT_IF=hci0
#
# Set this to 'nolog' if you want pppd to be quiet on startup.
PPPD_QUIET='debug'
#
# Change this line if your RFCOMM devices show up in some nonstandard
# directory.
RFCOMM_DEVPATH=/dev
#
# Change this line if you are already using rfcomm7
RFCOMM_DEV=rfcomm7
#
##############################
#
hciconfig $BT_IF auth encrypt secure
#
# Find what channel the DUN service is hiding on today. This hops around
# for some reason on the Treo.
#
CHANNEL=`sdptool search --bdaddr $PHONE_BT_ADDR DUN | egrep Channel | cut -d: -f2`
if [ -z $CHANNEL ]; then
echo Could not find dial-up networking service on $PHONE_BT_ADDR.
exit 254
fi
#
# Bind a local RFCOMM device to that channel - releasing the existing
# binding if it's already present.
#
if [ -c $RFCOMM_DEVPATH/$RFCOMM_DEV ]; then
rfcomm -i $BT_IF release $RFCOMM_DEV
fi
rfcomm -i $BT_IF bind $RFCOMM_DEV $PHONE_BT_ADDR $CHANNEL
#
# Start the PPP connection.
#
pppd $RFCOMM_DEVPATH/$RFCOMM_DEV 921600 connect '/usr/sbin/chat -s -v "" "AT&F0E0V1S0=0" OK ATD#777 CONNECT' $PPPD_QUIET updetach crtscts noipdefault novj lcp-echo-failure 0 nobs
dcomp novjccomp nopcomp noaccomp noauth user USERNAME modem usepeerdns defaultroute connect-delay 5000


rek2 wrote:hmm I already have that option..maybe something else?Hi, there seems to be some kind of problem/bug with pppd and openrc. I've noticed this when I tried to connect via my usb adsl modem. Anyway, net.ppp0 should contain updetach in ppp options, something like this should do the trick
pppd will establish a connection, and openrc will issue a warning that interface is not under its control, but it'll work fineCode: Select all
pppd_ppp0=( "defaultroute usepeerdns noipdefault noauth holdoff 10 maxfail 0 persist asyncmap 0 lcp-echo-interval 2 lcp-echo-failure 7 receive-all debug updetach" )
this is what I have.. I dont use net.ppp0 but a custom script to bring create a rfcomm and ppp etc..
this below is the ppp lineand here is the full script:Code: Select all
pppd $RFCOMM_DEVPATH/$RFCOMM_DEV 921600 connect '/usr/sbin/chat -s -v "" "AT&F0E0V1S0=0" OK ATD#777 CONNECT' $PPPD_QUIET updetach crtscts noipdefault novj lcp-echo-failure 0 nobs dcomp novjccomp nopcomp noaccomp noauth user USERNAME modem usepeerdns defaultroute connect-delay 5000Code: Select all
#!/bin/sh # # start-bt-modem: Start "dial-up networking" via Bluetooth with a Treo 700p. # Paul Walmsley <paul@booyaka.com> 20071219 # # For this script to work, you must already have paired your computer and # the phone, and the computer should appear in the "trusted devices list" # on your Treo. # # You'll need to change the PHONE_BT_ADDR variable to match your phone's # Bluetooth address. To find this, set your Treo's Bluetooth visibility # to "Temporary" and run 'hcitool scan' on your Linux box. # PHONE_BT_ADDR=00:07:E0:82:D3:04 # hciconfig hci0 down hciconfig hci0 up /etc/init.d/bluetooth restart ############################# # # Items you are unlikely to need to change # # Bluetooth interface device name - run 'hciconfig' to find this BT_IF=hci0 # # Set this to 'nolog' if you want pppd to be quiet on startup. PPPD_QUIET='debug' # # Change this line if your RFCOMM devices show up in some nonstandard # directory. RFCOMM_DEVPATH=/dev # # Change this line if you are already using rfcomm7 RFCOMM_DEV=rfcomm7 # ############################## # hciconfig $BT_IF auth encrypt secure # # Find what channel the DUN service is hiding on today. This hops around # for some reason on the Treo. # CHANNEL=`sdptool search --bdaddr $PHONE_BT_ADDR DUN | egrep Channel | cut -d: -f2` if [ -z $CHANNEL ]; then echo Could not find dial-up networking service on $PHONE_BT_ADDR. exit 254 fi # # Bind a local RFCOMM device to that channel - releasing the existing # binding if it's already present. # if [ -c $RFCOMM_DEVPATH/$RFCOMM_DEV ]; then rfcomm -i $BT_IF release $RFCOMM_DEV fi rfcomm -i $BT_IF bind $RFCOMM_DEV $PHONE_BT_ADDR $CHANNEL # # Start the PPP connection. # pppd $RFCOMM_DEVPATH/$RFCOMM_DEV 921600 connect '/usr/sbin/chat -s -v "" "AT&F0E0V1S0=0" OK ATD#777 CONNECT' $PPPD_QUIET updetach crtscts noipdefault novj lcp-echo-failure 0 nobs dcomp novjccomp nopcomp noaccomp noauth user USERNAME modem usepeerdns defaultroute connect-delay 5000


Code: Select all
Apr 23 13:08:50 lapadon chat[7748]: abort on (BUSY)
Apr 23 13:08:50 lapadon chat[7748]: abort on (ERROR)
Apr 23 13:08:50 lapadon chat[7748]: abort on (NO ANSWER)
Apr 23 13:08:50 lapadon chat[7748]: abort on (NO CARRIER)
Apr 23 13:08:50 lapadon chat[7748]: abort on (NO DIALTONE)
Apr 23 13:08:50 lapadon chat[7748]: abort on (Invalid Login)
Apr 23 13:08:50 lapadon chat[7748]: abort on (Login Incorrect)
Apr 23 13:08:50 lapadon chat[7748]: timeout set to 5 seconds
Apr 23 13:08:50 lapadon chat[7748]: send (ATZ^M)
Apr 23 13:08:50 lapadon chat[7748]: expect (OK)
Apr 23 13:08:50 lapadon chat[7748]: ATZ^M^M
Apr 23 13:08:50 lapadon chat[7748]: OK
Apr 23 13:08:50 lapadon chat[7748]: -- got it
Apr 23 13:08:50 lapadon chat[7748]: send (AT+CGDCONT=1,IP,wap.cingular,,0,0^M)
Apr 23 13:08:50 lapadon chat[7748]: expect (OK)
Apr 23 13:08:50 lapadon chat[7748]: ^M
Apr 23 13:08:50 lapadon chat[7748]: AT+CGDCONT=1,IP,wap.cingular,,0,0^M^M
Apr 23 13:08:50 lapadon chat[7748]: ERROR
Apr 23 13:08:50 lapadon chat[7748]: -- failed
Apr 23 13:08:50 lapadon chat[7748]: Failed (ERROR)




The examples for multiple IPs goes like this:depontius wrote:I need to do something similar for my routing. I have a static route plus a default route, specified similarly to your multiple IPs. I think the solution will end up being similar.
Have you installed the new baselayout-2 yet? I presume they'll have a pretty good set of examples somewhere in there.
Code: Select all
# If you need more than one address, you can use something like this
# NOTE: ifconfig creates an aliased device for each extra IPv4 address
# (eth0:1, eth0:2, etc)
# iproute2 does not do this as there is no need to
#config_eth0="192.168.0.2/24 192.168.0.3/24 192.168.0.4/24"
# However, that only works with CIDR addresses, so you can't use netmask.
# Or you can use sequence expressions
#config_eth0="192.168.0.{2..4}/24"
# which does the same as above. Be careful though as if you use this and
# fallbacks, you have to ensure that both end up with the same number of
# values otherwise your fallback won't work correctly.
# You can also use IPv6 addresses
# (you should always specify a prefix length with IPv6 here)
#config_eth0="192.168.0.2/24 4321:0:1:2:3:4:567:89ab/64 4321:0:1:2:3:4:567:89ac/64"
Code: Select all
config_eth0="64.34.178.46 netmask 255.255.255.192 brd 64.255.255.255
64.34.175.187 netmask 255.255.255.0 brd 64.255.255.255
64.34.175.172 netmask 255.255.255.0 brd 64.255.255.255"
I tested this in my Gentoo VM and it worked, so I'm gonna try it live on my systems probably later tonight. Thanks!pappy_mcfae wrote:If I read the /usr/share/doc/openrc/net.example correctly, you drop the parentheses all together, and enclose everything in quotes, as I have done below.I think it works.Code: Select all
config_eth0="64.34.178.46 netmask 255.255.255.192 brd 64.255.255.255 64.34.175.187 netmask 255.255.255.0 brd 64.255.255.255 64.34.175.172 netmask 255.255.255.0 brd 64.255.255.255"
Blessed be!
Pappy