Page 16 of 19 FirstFirst ... 61415161718 ... LastLast
Results 226 to 240 of 273

Thread: New 1.0.4.6 based custom firmware

  1. #226
    Join Date
    Apr 2007
    Location
    Great White North
    Posts
    28
    Quote Originally Posted by glenmaroney View Post
    the rc.local isn't being executed when the router reboots. Any ideas why not?
    I will ask the obvious question: Did you rc.local move it to /shares/MYVOLUME1 and chmod the file to 775?

    I guess I should ask the other question: How do you know it is not getting executed?

  2. #227

    rc.local still not executing!

    Quote Originally Posted by Hacksaw View Post
    I will ask the obvious question: Did you rc.local move it to /shares/MYVOLUME1 and chmod the file to 775?

    I guess I should ask the other question: How do you know it is not getting executed?
    Unfortunately, I have got it in the right place and I chmod ed it to 755...should it be 775?

    I know it's not being executed because after a reboot I have to modify the path and mount /opt again.

  3. #228
    Join Date
    Apr 2007
    Location
    Great White North
    Posts
    28
    Quote Originally Posted by glenmaroney View Post
    Unfortunately, I have got it in the right place and I chmod ed it to 755...should it be 775?
    Sorry, typo on my part. It should be 755.

    Have you tried executing the operations in the rc.local file separately to determine if they are valid? I am wondering if the if statements are not getting through properly.

    Hacksaw.
    Last edited by Hacksaw; 24-04-2007 at 17:44.

  4. #229
    Join Date
    Feb 2007
    Location
    Santa Rosa, California
    Posts
    6

    Minor tweak to rc.local

    The two lines in rc.local assume the pre-existence of two exports: PATH and LD_LIBRARY_PATH. After some fiddling, I found that PATH existed on my system, but LD_LIBRARY_PATH did not. This seemed to break the second export in my system, so I changed it from
    export LD_LIBRARY_PATH=/opt/lib:${LD_LIBRARY_PATH}
    to a simpler
    export LD_LIBRARY_PATH=/opt/lib:/shares/lib
    This was done in both rc.local and .profile. After that, ipkg and other things behaved more to expectation.

    Dropbear never starts automatically for me. Anyone have an idea why
    if [ \! -a /var/run/dropbear.pid ]; then
    is not working for me?

    --Brian

    BTB: Here's to you, kfurge, for all your work and continued support. Thank you!

  5. #230
    Quote Originally Posted by BrianKDav View Post
    This was done in both rc.local and .profile. After that, ipkg and other things behaved more to expectation.
    Same for my .profile. I agree rc.local should match.
    Quote Originally Posted by BrianKDav View Post
    Dropbear never starts automatically for me. Anyone have an idea why

    if [ \! -a /var/run/dropbear.pid ]; then

    is not working for me?
    Does this it work OK when executed under a standard login shell? If so, you might be seeing a busybox shell quirk. If not, please post more of your rc.local file. Maybe the shell is terminating prior to executing the if statement?

    An interesting quirk I found is that the busybox /bin/shell, when executing a script under a login shell, properly sets $VAR in the following:

    VAR=`/bin/pwd`

    but when the same script is executed directly from the kernel as a replacement for /bin/miscio_input_change (which is called whenever one of the buttons is pressed) $VAR remains empty. Writing to syslog indicated that /bin/pwd executed OK. However, the shell refused to set the variable regardless of what I tried.

    - K.C.

  6. #231
    Join Date
    Feb 2007
    Location
    Santa Rosa, California
    Posts
    6

    re question about IF stmt

    Here's the entire rc.local

    #!/bin/sh

    pool=`nvram get apps_pool`
    share=`nvram get apps_share`
    internal_hdd=/dev/ide/host2/bus0/target0/lun0/disc

    if [ \! -f /tmp/rc.local.done ]; then

    # Indicate we've already done this
    touch /tmp/rc.local.done

    #
    # Mount /opt and connect in various system files
    #
    if [ -e /shares/${pool}/opt ]; then
    mount -o bind /shares/${pool}/opt /opt

    cat /proc/mounts > /opt/etc/fstab

    ln -s /opt/etc/shells /tmp/shells
    ln -s /opt/etc/fstab /tmp/fstab

    export PATH=/opt/bin:/opt/sbin:${PATH}
    export LD_LIBRARY_PATH=/opt/lib:/shares/lib
    fi

    # Start utelnetd on local interface only!
    /apps/bin/utelnetd -i br0 &

    # Test for and start dropbear
    echo "dropbear?" | logger -p local0.notice
    if [ \! -a /var/run/dropbear.pid ]; then
    echo "dropbear!" | logger -p local0.notice
    /opt/etc/init.d/S51dropbear
    echo "dropbear started" | logger -p local0.notice
    fi

    # Stop & Start web server
    echo "thttpd" | logger -p local0.notice
    killall thttpd
    /apps/bin/thttpd -dd /shares/webbase -p 8081 -i /var/run/thttpd.pid -v

    # Add confirmation that rc.local was executed
    echo "rc.local executed" | logger -p local0.notice

    fi
    Not much different from your samples...

    I'll try rebooting if necessary to review the log messages.

    --Brian

  7. #232
    Quote Originally Posted by BrianKDav View Post
    Not much different from your samples...
    Yep, that should work OK. Any chance that the dropbear startup script is not set as executable?

    - K.C.

  8. #233
    Join Date
    Apr 2007
    Location
    Great White North
    Posts
    28
    Quick question as I am slightly confused. I have just gone throught he instructions for building the 1.0.4.6 based firmware and am now up to applying K.C.'s modifications.

    http://home.comcast.net/~kfurge/wl700ge.html indicates in step 2.3 to "cd to ./exinstall/apps/bin" but I don't have an apps directory under exinstall. Here is the path I found rcex under: /opt/WL700g/nasoc/src/apps/tarfiles/exinstall/bin

    Is this the file I should be looking for?

    Here is another one. Step 6.1 states:
    # Disable the config rewrite nonsense in $(apps)/Makefile by commenting out the line immediately under the "busybox:" target label.
    I assume then that this line would be the one that starts with "cd busybox"?
    Code:
    busybox:
            cd busybox && rm -f .config && ln -s NASoC_config .config
            $(MAKE) -C busybox dep
            $(MAKE) -C busybox STRIPTOOL=$(STRIP)
    I guess I leave the "cd busybox" command in and remove the rest?

    Thanks,
    Hacksaw.
    Last edited by Hacksaw; 02-05-2007 at 01:49. Reason: Added second question.
    http://hacksaw.dnsalias.org - my WL-700gE in action.
    http://thecomichaven.com - my favorite site!

  9. #234
    Quote Originally Posted by Hacksaw View Post
    Here is the path I found rcex under: /opt/WL700g/nasoc/src/apps/tarfiles/exinstall/bin

    Is this the file I should be looking for?
    It's been a while since I posted the instructions, and I've modified my build environment since, but I believe you're right. The makefile uses exinstall.tar to build the image so you'll have to tar up any of your changes in the exinstall directory back to exinstall.tar to make them stick.

    Quote Originally Posted by Hacksaw View Post

    I guess I leave the "cd busybox" command in and remove the rest?
    Comment out the whole line.

    - K.C.

  10. #235
    Join Date
    Apr 2007
    Location
    Great White North
    Posts
    28
    Thanks K.C.!

    I have rebuilt the image using your instructions and attempted to apply the iptables recent module support. I have applied the patches to the kernel and rebuilt it, but am having issues getting the libipt_recent.so built. I might not need it, so i am going to flash the load I have and see what happens.

    Hacksaw.
    http://hacksaw.dnsalias.org - my WL-700gE in action.
    http://thecomichaven.com - my favorite site!

  11. #236

    I locked myself out - Previous version of Kfurge's firmware?

    I locked myself out of my shell (no telnet, no valid shell for ssh), so cannot get into my WL700.

    Although I have tried various approaches described on the forum, I cannot prevent the rc.local in /MYVOLUME1/ from being executed (and preventing me from logging in). The telnet hack described, does not work for me (see my other post http://wl500g.info/showthread.php?t=8858).

    Therefore I was wondering if a previous version of Kfurge's firmware might do the trick. Especially the one that expects an rc.local in /MYVOLUME1/MYSHARE1/. This location I can reach (by nfs) and can modify files in.

    I'm thinking that downgrading to that custom firmware might force the WL700 to use the rc.local in /MYSHARE1/ which I could make to enable telnet. Right?

    Only problem, Kfurge doesnt offer this version for download, and I do not know which version of Kfurge's firmware it should be. Can anybody help me with this? Thanks.


    Downgrading to the previous version worked like a charm...
    Last edited by oclee; 09-05-2007 at 08:45. Reason: fix

  12. #237
    To get previous version of Kfurge's firmware, go to post 36 of this thread!

    LK

  13. #238
    Quote Originally Posted by LeperKing View Post
    To get previous version of Kfurge's firmware, go to post 36 of this thread!
    LK
    Right... that was the one thing I didn't search the whole forum for... *oops*
    Thanks!

  14. #239
    Join Date
    Feb 2007
    Location
    Santa Rosa, California
    Posts
    6
    Quote Originally Posted by oclee View Post
    I locked myself out of my shell (no telnet, no valid shell for ssh), so cannot get into my WL700.
    Did that myself once, and had to resort to the hack where you put the telnet startup in one of the cgi scripts. Only problem was that I couldn't mark as executable the script I wanted to use to start telnet. (This I could see by failures to execute, and a directory command in FTP access.) I got around the inability to mark it executable it by putting the script, with the executable properties already set, on a USB drive. This was done from my Ubuntu system - not sure how to do it with Windows. I then plugged the USB drive in and hit copy. Once the script was in the USBCOPY folder, I used FTP to copy it to a location accessible in a browser session. Invoking the cgi via a browser started telnet (on br0, of course).

    I hope this helps!

    --Brian

    Here's the link to telnet / cgi hack. My only problem is that, as mentioned above, I couldn't make the CHMOD command work.
    http://www.wl500g.info/showthread.php?t=7434

  15. #240
    Join Date
    Feb 2007
    Location
    Santa Rosa, California
    Posts
    6

    Still wanting dropbear to autostart.

    Quote Originally Posted by kfurge View Post
    Yep, that should work OK. Any chance that the dropbear startup script is not set as executable?

    - K.C.
    Nope, it's set executable. If the ASUS box is starting due to a power failure, do you think it could be actually finding the dropbear.pid file? I thought the /var/run folder got rebuilt and/or cleared on a restart. Sometimes these computers frustrate us by doing exactly what we tell them to do!

    --Brian

    As I get moments here and there, I want to improve the message logging on this system.

Page 16 of 19 FirstFirst ... 61415161718 ... LastLast

Similar Threads

  1. ksoftirqd_CPU0 eating CPU in firmware 1.0.4.6?
    By Hobi in forum WL-700g Firmware Discussion
    Replies: 10
    Last Post: 12-05-2007, 16:04
  2. Custom firmware image: v1.9.4.6 with telnetd re-enabled
    By db90h in forum WL-530g Firmware Releases
    Replies: 2
    Last Post: 29-01-2007, 13:32
  3. custom firmware based on 1.9.5.0 beta?
    By Teddy in forum WL-500g Custom Development
    Replies: 5
    Last Post: 14-05-2006, 20:08
  4. Custom firmware
    By menno in forum Dutch Discussion - Nederlands
    Replies: 0
    Last Post: 02-04-2006, 14:32
  5. Custom Firmware v1.1.2.7
    By JOCKYW2001 in forum WL-HDD Firmware Releases
    Replies: 59
    Last Post: 11-12-2004, 12:26

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •