Results 1 to 6 of 6

Thread: post-boot NOT executed (OLEG 1.9.2.7-8)

  1. #1

    Starting busybox_http using post-boot

    Hi,

    I could you use your help, here.

    I've been using my WL-HDD for years now with FW 1.2.3.0, but now I would like to add a webserver to my WL-HDD. Tweaking the builtin webserver does not seem possible so I installed the OLEG FW, so I could use busybox_httpd.

    If I start busybox_httpd -p 8080 -h /tmp/harddisk/www the webserver (files are on the disk in the WL-HDD in the WWW directory) is running and I can use it with Internet Explorer. So far, so good.

    To make sure that busybox_httpd is also restarted after a reboot I followed the instructions on this board and I:
    - created a post-boot script in the /usr/local/sbin directory
    - made it executable
    - tested it (it works)
    - saved it to flash using FLASHFS
    Unfortunately after a reboot it seems like the post-boot is not started. The ECHO messages in the script that are supposed to enter some text in a file do not appear, and PS reveals that busybox_http is NOT running.

    I've read MANY messages on this board and the internet, but to no avail. It's probably something "stupid" on my part.

    Perhaps one of you would be so kind to peek at the information copied from the telnet sessiona glance, and spot the problem.
    Code:
    [admin@wl-hdd sbin]$ pwd
    /usr/local/sbin
    [admin@wl-hdd sbin]$ cat post-boot
    #!/bin/sh
    echo post-boot >>/tmp/harddisk/system/postboot.txt
    date >>/tmp/harddisk/system/postboot.txt
    busybox_httpd -p 8080 -h /www >>/tmp/harddisk/system/postboot.txt
    [admin@wl-hdd sbin]$ flashfs save
    tar: Removing leading '/' from member names
    tmp/local/
    tmp/local/sbin/
    tmp/local/sbin/post-boot
    tmp/local/sbin/post-firewall
    tmp/local/root/
    -rw-r--r--    1 admin    root          293 Jan  1 00:04 /tmp/flash.tar.gz
    Check saved image and type "/sbin/flashfs commit" to commit changes
    [admin@wl-hdd sbin]$ flashfs commit
    .
    Committed.
    [admin@wl-hdd sbin]$ flashfs enable
    [admin@wl-hdd sbin]$ post-boot
    busybox_httpd: bind: Address already in use
    [admin@wl-hdd sbin]$ reboot
    [admin@wl-hdd sbin]$
    Last edited by gerardwr; 22-04-2008 at 21:52. Reason: More appropriate title description

  2. #2
    Further investigation shows that:
    - the post-boot IS executed, my mistake.
    - the busybox_httpd command fails, probably because the internal harddisk is not yet mounted when post-boot runs. I think I have seen some posts about this here.

    If I direct busybox_httpd to a directory on /usr/local/sbin the webserver is started at post-boot time. The test-code I used in post-boot is shown below.

    Code:
    [admin@wl-hdd sbin]$ cat post-boot
    #!/bin/sh
    date >>/usr/local/sbin/post-boot.txt
    busybox_httpd -p 8080 -h /usr/local/sbin/www 1>>/usr/local/sbin/post-boot.txt 2>>/usr/local/sbin/post-boot.txt
    echo post-boot ended >>/usr/local/sbin/post-boot.txt
    [admin@wl-hdd sbin]$
    Now I have to look into solving the "not mounted" issue, because the WL-HDD does not provide a lot of space for websites.

    Feel free to drop a hint if you can.

  3. #3
    Join Date
    Feb 2007
    Location
    Moscow, Russia
    Posts
    3,805
    "busybox_httpd: bind: Address already in use" means that some service is already sitting on the port 8080. Check it with:
    netstat -na | grep LISTEN

    To use netstat install net-tools first

  4. #4
    Quote Originally Posted by al37919 View Post
    "busybox_httpd: bind: Address already in use" means that some service is already sitting on the port 8080. Check it with:
    netstat -na | grep LISTEN

    To use netstat install net-tools first
    Thanks for your input, but that's not the problem that's bothering me.

    As I reported in my previous post busybox-http is now succesfully started by means of the post-boot script. The PS command shows that it is running, as long as it is pointing to a directory in the WL-HDD RAM (like /usr/local/sbin) If I direct it to a directory on the builtin harddisk the startup fails because apparently the disk is not mounted yet at post-boot time.

    So if the busybox_http is started AFTER the harddisk is mounted all should be well. I just read on the OLEG pages that in addition to post-boot no also the post-mount is added to run at startup, AFTER external devices are mounted. I will give this a try, and report back.
    Last edited by gerardwr; 22-04-2008 at 21:02. Reason: Adding final chapter

  5. #5

    Startup busybox_httpd via post-mount works!

    WORKS!!

    As indicated in my previous post I have moved the contents of my post-boot to post-mount. Now the busybox_http server is started, pointing at webcontent on the built-in harddisk. In IE the URL wl-hdd:8080 shows the content of my www directory. On port 80 of the wl-hdd the original website for configuration is available as usal.

    For your reference, the telnet log below shows the location and content of my post-mount file.

    Thanks to OLEG for his excellent firmware, thanks to the webmaster for the valuable contents in this forum.


    Code:
    [admin@wl-hdd sbin]$ pwd
    /usr/local/sbin
    [admin@wl-hdd sbin]$ ls -al post-mount
    -rwxr-xr-x    1 admin    root          253 Apr 22 20:29 post-mount
    [admin@wl-hdd sbin]$ cat post-mount
    #!/bin/sh
    date >>/usr/local/sbin/post-mount.txt
    mount >>/usr/local/sbin/post-mount.txt
    busybox_httpd -p 8080 -h /tmp/harddisk/www 1>>/usr/local/sbin/post-mount.txt 2>>
    echo post-mount ended >>/usr/local/sbin/post-mount.txt
    [admin@wl-hdd sbin]$
    The telnet log below shows the contents of the post-mount.txt file that is created by the post-mount command.
    Code:
    [admin@wl-hdd sbin]$ cat post-mount.txt
    Tue Apr 22 20:31:23 UCT 2008
    /dev/root on / type squashfs (ro)
    none on /dev type devfs (rw)
    proc on /proc type proc (rw)
    ramfs on /tmp type ramfs (rw)
    usbfs on /proc/bus/usb type usbfs (rw)
    /dev/discs/disc0/part1 on /tmp/harddisk type vfat (rw,noatime)
    post-mount ended
    [admin@wl-hdd sbin]$

  6. #6

    Your busybox_httpd server - how to start ?

    Hi Gerhard,

    could you kindly tell me how to start with busy-box httpd web server on my WL-500gP v2 ?
    Is there any chance to use the original firmware by Asus and get root access
    to edit some files, install busybox and more
    or I should install firmware by Oleg .

    Darius

Similar Threads

  1. Post your startup/shutdown files here!
    By wirespot in forum WL-500gP Tutorials
    Replies: 3
    Last Post: 10-12-2010, 23:49
  2. [Prob] Mediatomb UPnP Media Server auf dem Asus Wl-500 gP (Oleg)? Wie?
    By edelknecht in forum German Discussion - Deutsch (DE)
    Replies: 15
    Last Post: 16-04-2010, 12:54
  3. 500G Deluxe met Oleg
    By MarkMark in forum Dutch Discussion - Nederlands
    Replies: 5
    Last Post: 07-02-2008, 20:35
  4. Oleg and openWRT FW parallel boot on wl500gP?
    By dyonisos in forum WL-500gP Q&A
    Replies: 1
    Last Post: 01-05-2007, 20:56
  5. twonky media server, network drive with oleg firmware
    By black_bottom in forum WL-HDD Q&A
    Replies: 3
    Last Post: 22-03-2006, 07:15

Posting Permissions

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