PDA

Bekijk de volledige versie : How can I postpone PPPoe connection 30 seconds



bearfoot
25-11-2008, 09:11
I final found the value of my ASUS wl-500gp until I foud here - ASUS wl-500's home, thanks everybody here !
I installed my wl-500gp with oleg's lastest firmware and headstart according the tutorial in this forum, it's perfect except this:
my wl-500gp and ADSL modem are controlled by one power switch, I always turn both devices on by this switch ,sometime the wl-500gp can't get PPPoe connection until I reboot the wl-500gp by type reboot in putty or just plug and replug the power of wl-500gp, I guess it's problem that my wl-500gp do the PPPoe connection when my ADSL modem initilization not completed, then get something wrong....
so how can I postpone the wl-500gp start pppoe connection 30 seconds or just wait until the modem initilization completed.oh, I have already set the PPPoE Idle Disconnect Time to 0

raas
25-11-2008, 09:51
Hi BearFoot,

look in /usr/local/sbin/

there are several startup and shutdown scripts.
Add the following code to one of the startup scripts:


sleep 30s

(As I don't know exactly in which order they are executed, you'll have to play around with this to get the right script for good results)

HTH

bearfoot
26-11-2008, 03:55
Thanks! raas, I added it at post-mount script, just like this:


#! /bin/sh
sleep 30s
/opt/etc/init.d/rc.unslung start

but I find the timestamp of PPPoe loading does't change, here I post the syslog before I made change as below:

......(the other kernel part initilization are all OK)
Jan 1 08:00:06 kernel: Attached scsi disk sda at scsi0, channel 0, id 0, lun 0
Jan 1 08:00:06 kernel: SCSI device sda: 156301488 512-byte hdwr sectors (80026 MB)
Jan 1 08:00:06 kernel: Partition check:
Jan 1 08:00:06 kernel: p1 p2 p3
Jan 1 08:00:06 kernel: USB Mass Storage support registered.
Jan 1 08:00:06 kernel: vlan1: Setting MAC address to 00 1b fc d4 68 46.
Jan 1 08:00:06 kernel: VLAN (vlan1): Underlying device (eth0) has same MAC, not checking promiscious mode.
Jan 1 08:00:07 pppd[104]: Plugin rp-pppoe.so loaded.
Jan 1 08:00:07 pppd[104]: RP-PPPoE plugin version 3.3 compiled against pppd 2.4.2
Jan 1 08:00:07 pppd[105]: pppd 2.4.2 started by admin, uid 0
Jan 1 08:00:08 dropbear[117]: Running in background
Jan 1 08:00:18 kernel: Adding Swap: 506008k swap-space (priority -1)
Jan 1 08:00:18 e2fsck: /dev/discs/disc0/part2: recovering journal
Jan 1 08:00:23 e2fsck: /dev/discs/disc0/part2: Clearing orphaned inode 15785 (uid=0, gid=0, mode=0140777, size=0)
Jan 1 08:00:23 e2fsck: /dev/discs/disc0/part2: clean, 15266/125696 files, 88122/251015 blocks (check after next mount)
Jan 1 08:00:23 e2fsck: /dev/discs/disc0/part3: recovering journal
Jan 1 08:00:23 e2fsck: /dev/discs/disc0/part3: clean, 11739/9584640 files, 17773054/19159520 blocks (check after next mount)
Jan 1 08:00:24 kernel: kjournald starting. Commit interval 5 seconds
Jan 1 08:00:24 kernel: EXT3 FS 2.4-0.9.19, 19 August 2002 on sd(8,2), internal journal
Jan 1 08:00:24 kernel: EXT3-fs: mounted filesystem with ordered data mode.
Jan 1 08:00:24 kernel: kjournald starting. Commit interval 5 seconds
Jan 1 08:00:24 kernel: EXT3 FS 2.4-0.9.19, 19 August 2002 on sd(8,3), internal journal
Jan 1 08:00:24 kernel: EXT3-fs: mounted filesystem with ordered data mode.
Jan 1 08:00:24 rc.unslung: start service /opt/etc/init.d/S05syslogd
Jan 1 08:00:24 System log daemon exiting.
Jan 1 08:00:26 syslogd started: BusyBox v1.1.3
Jan 1 08:00:30 rc.unslung: start service /opt/etc/init.d/S10cron
Jan 1 08:00:30 /opt/sbin/cron[183]: (CRON) STARTUP (V5.0)
Jan 1 08:00:30 rc.unslung: start service /opt/etc/init.d/S10xinetd
Jan 1 08:00:30 rc.unslung: start service /opt/etc/init.d/S20dbus
Jan 1 08:00:31 xinetd[192]: missing service keyword [file=/opt/etc/xinetd.conf] [line=18]
Jan 1 08:00:31 xinetd[192]: missing } in last service entry [file=/opt/etc/xinetd.conf] [line=18]
Jan 1 08:00:31 xinetd[192]: xinetd Version 2.3.14 started with no options compiled in.
Jan 1 08:00:31 xinetd[192]: Started working: 1 available service
Jan 1 08:00:31 rc.unslung: start service /opt/etc/init.d/S45php
Jan 1 08:00:31 rc.unslung: start service /opt/etc/init.d/S58proftpd
Jan 1 08:00:32 proftpd[218]: WL-500GP - ProFTPD 1.3.1 (stable) (built Fri Jul 25 19:23:11 UTC 2008) standalone mode STARTUP
Jan 1 08:00:32 rc.unslung: start service /opt/etc/init.d/S70mysqld
Jan 1 08:00:34 rc.unslung: start service /opt/etc/init.d/S80busybox_httpd
Jan 1 08:00:35 rc.unslung: start service /opt/etc/init.d/S80lighttpd
Jan 1 08:00:36 rc.unslung: start service /opt/etc/init.d/S99rtorrent
Jan 1 08:01:01 /opt/sbin/cron[412]: (admin) CMD (run-parts /opt/etc/cron.1min)
Jan 1 08:01:03 dnsmasq[72]: DHCPNAK(br0) 10.204.232.117 00:04:23:60:b1:2d wrong network
Jan 1 08:01:07 dnsmasq[72]: DHCPDISCOVER(br0) 00:04:23:60:b1:2d
Jan 1 08:01:07 dnsmasq[72]: DHCPOFFER(br0) 192.168.1.184 00:04:23:60:b1:2d
Jan 1 08:01:10 dnsmasq[72]: DHCPDISCOVER(br0) 00:04:23:60:b1:2d
Jan 1 08:01:10 dnsmasq[72]: DHCPOFFER(br0) 192.168.1.184 00:04:23:60:b1:2d
Jan 1 08:01:10 dnsmasq[72]: DHCPREQUEST(br0) 192.168.1.184 00:04:23:60:b1:2d
Jan 1 08:01:10 dnsmasq[72]: DHCPACK(br0) 192.168.1.184 00:04:23:60:b1:2d mypc
Jan 1 08:01:19 dnsmasq[72]: DHCPINFORM(br0) 192.168.1.184 00:04:23:60:b1:2d
Jan 1 08:01:19 dnsmasq[72]: DHCPACK(br0) 192.168.1.184 00:04:23:60:b1:2d mypc
Jan 1 08:02:01 /opt/sbin/cron[705]: (admin) CMD (run-parts /opt/etc/cron.1min)
Jan 1 08:03:01 /opt/sbin/cron[1000]: (admin) CMD (run-parts /opt/etc/cron.1min)
Jan 1 08:04:01 /opt/sbin/cron[1296]: (admin) CMD (run-parts /opt/etc/cron.1min)
Jan 1 08:04:03 dnsmasq[72]: DHCPREQUEST(br0) 10.204.232.117 00:04:23:60:b1:2d
Jan 1 08:04:03 dnsmasq[72]: DHCPNAK(br0) 10.204.232.117 00:04:23:60:b1:2d wrong address
Jan 1 08:04:04 dnsmasq[72]: DHCPDISCOVER(br0) 00:04:23:60:b1:2d
Jan 1 08:04:04 dnsmasq[72]: DHCPOFFER(br0) 192.168.1.184 00:04:23:60:b1:2d
Jan 1 08:04:04 dnsmasq[72]: DHCPREQUEST(br0) 192.168.1.184 00:04:23:60:b1:2d
Jan 1 08:04:04 dnsmasq[72]: DHCPACK(br0) 192.168.1.184 00:04:23:60:b1:2d SZHUPAS9MZWB5-L
Jan 1 08:04:55 dnsmasq[72]: DHCPINFORM(br0) 192.168.1.184 00:04:23:60:b1:2d
Jan 1 08:04:55 dnsmasq[72]: DHCPACK(br0) 192.168.1.184 00:04:23:60:b1:2d SZHUPAS9MZWB5-L
Jan 1 08:05:01 /opt/sbin/cron[1603]: (admin) CMD (run-parts /opt/etc/cron.5mins)
Jan 1 08:05:01 /opt/sbin/cron[1605]: (admin) CMD (run-parts /opt/etc/cron.1min)
Jan 1 08:06:01 /opt/sbin/cron[1904]: (admin) CMD (run-parts /opt/etc/cron.1min)

bearfoot
26-11-2008, 04:05
here is the new syslog after I add "sleep 30s" in post-mount, luckly this time the PPPoe connection is OK, but I don't think it's contributed from adding "sleeping 30s", ( I can get PPPoe connection successful some times)

.......(the other knernel initilization are all OK)
Jan 1 08:00:06 kernel: Attached scsi disk sda at scsi0, channel 0, id 0, lun 0
Jan 1 08:00:06 kernel: SCSI device sda: 156301488 512-byte hdwr sectors (80026 MB)
Jan 1 08:00:06 kernel: Partition check:
Jan 1 08:00:06 kernel: p1 p2 p3
Jan 1 08:00:06 kernel: USB Mass Storage support registered.
Jan 1 08:00:06 kernel: vlan1: Setting MAC address to 00 1b fc d4 68 46.
Jan 1 08:00:06 kernel: VLAN (vlan1): Underlying device (eth0) has same MAC, not checking promiscious mode.
Jan 1 08:00:07 pppd[104]: Plugin rp-pppoe.so loaded.
Jan 1 08:00:07 pppd[104]: RP-PPPoE plugin version 3.3 compiled against pppd 2.4.2
Jan 1 08:00:07 pppd[105]: pppd 2.4.2 started by admin, uid 0
Jan 1 08:00:08 dropbear[118]: Running in background
Jan 1 08:00:18 kernel: Adding Swap: 506008k swap-space (priority -1)
Jan 1 08:00:18 e2fsck: /dev/discs/disc0/part2: recovering journal
Jan 1 08:00:18 e2fsck: /dev/discs/disc0/part2: clean, 15262/125696 files, 88127/251015 blocks (check after next mount)
Jan 1 08:00:18 e2fsck: /dev/discs/disc0/part3: recovering journal
Jan 1 08:00:18 e2fsck: /dev/discs/disc0/part3: clean, 11738/9584640 files, 17773053/19159520 blocks (check after next mount)
Jan 1 08:00:18 kernel: kjournald starting. Commit interval 5 seconds
Jan 1 08:00:18 kernel: EXT3 FS 2.4-0.9.19, 19 August 2002 on sd(8,2), internal journal
Jan 1 08:00:18 kernel: EXT3-fs: mounted filesystem with ordered data mode.
Jan 1 08:00:18 kernel: kjournald starting. Commit interval 5 seconds
Jan 1 08:00:19 kernel: EXT3 FS 2.4-0.9.19, 19 August 2002 on sd(8,3), internal journal
Jan 1 08:00:19 kernel: EXT3-fs: mounted filesystem with ordered data mode.
Jan 1 08:00:49 rc.unslung: start service /opt/etc/init.d/S05syslogd
Jan 1 08:00:49 System log daemon exiting.
Jan 1 08:00:51 syslogd started: BusyBox v1.1.3
Jan 1 08:00:51 syslogd: started.
Jan 1 08:00:51 rc.unslung: start service /opt/etc/init.d/S08samba
Jan 1 08:00:55 rc.unslung: start service /opt/etc/init.d/S10cron
Jan 1 08:00:55 rc.unslung: start service /opt/etc/init.d/S10xinetd
Jan 1 08:00:55 /opt/sbin/cron[184]: (CRON) STARTUP (V5.0)
Jan 1 08:00:55 rc.unslung: start service /opt/etc/init.d/S20dbus
Jan 1 08:00:55 xinetd[193]: missing service keyword [file=/opt/etc/xinetd.conf] [line=18]
Jan 1 08:00:55 xinetd[193]: missing } in last service entry [file=/opt/etc/xinetd.conf] [line=18]
Jan 1 08:00:56 xinetd[193]: xinetd Version 2.3.14 started with no options compiled in.
Jan 1 08:00:56 xinetd[193]: Started working: 1 available service
Jan 1 08:00:56 rc.unslung: start service /opt/etc/init.d/S45php
Jan 1 08:00:56 rc.unslung: start service /opt/etc/init.d/S58proftpd
Jan 1 08:00:57 proftpd[219]: WL-500GP - ProFTPD 1.3.1 (stable) (built Fri Jul 25 19:23:11 UTC 2008) standalone mode STARTUP
Jan 1 08:00:57 rc.unslung: start service /opt/etc/init.d/S70mysqld
Jan 1 08:01:01 /opt/sbin/cron[320]: (admin) CMD (run-parts /opt/etc/cron.1min)
Jan 1 08:01:03 rc.unslung: start service /opt/etc/init.d/S80busybox_httpd
Jan 1 08:01:03 rc.unslung: start service /opt/etc/init.d/S80lighttpd
Jan 1 08:01:04 rc.unslung: start service /opt/etc/init.d/S99rtorrent
Jan 1 08:01:40 pppd[105]: Using interface ppp0
Jan 1 08:01:40 pppd[105]: Connect: ppp0 <--> vlan1
Jan 1 08:01:43 pppd[105]: Remote message: Authentication success,Welcome!
Jan 1 08:01:43 pppd[105]: PAP authentication succeeded
Jan 1 08:01:43 pppd[105]: peer from calling number 00:E0:FC:8D:A5:D7 authorized
Jan 1 08:01:43 pppd[105]: local IP address 58.255.148.106
Jan 1 08:01:43 pppd[105]: remote IP address 58.255.148.1
Jan 1 08:01:44 PPPoE: connect to ISP
Nov 26 10:20:42 ntp client: Synchronizing time with time.nist.gov ...
Nov 26 10:20:49 /opt/sbin/cron[415]: (admin) CMD (run-parts /opt/etc/cron.5mins)
Nov 26 10:20:49 /opt/sbin/cron[416]: (admin) CMD (run-parts /opt/etc/cron.1min)
Nov 26 10:21:01 /opt/sbin/cron[426]: (admin) CMD (run-parts /opt/etc/cron.1min)
Nov 26 10:22:01 /opt/sbin/cron[439]: (admin) CMD (run-parts /opt/etc/cron.1min)

bearfoot
26-11-2008, 04:38
here is the files I have in /usr/local/sbin, I can't find the way to know the order they are executed, in general, I guess it should be pre-mount-->post-mount-->post-boot-->ez-setup-->post-firewall....


[admin@WL-500GP root]$ cd /usr/local/sbin
[admin@WL-500GP sbin]$ ls
total 0
drwxr-xr-x 1 admin root 0 Oct 11 23:48 .
drwxr-xr-x 1 admin root 0 Jan 1 2000 ..
-rwxr-xr-x 1 admin root 341 Oct 15 22:17 ez-setup
-rwxr-xr-x 1 admin root 42 Oct 15 21:49 post-boot
-rwxr-xr-x 1 admin root 504 Oct 16 21:22 post-firewall
-rwxr-xr-x 1 admin root 54 Nov 26 10:13 post-mount
-rwxr-xr-x 1 admin root 228 Oct 12 00:37 pre-mount
-rwxr-xr-x 1 admin root 585 Oct 16 21:25 pre-shutdown
[admin@WL-500GP sbin]$