Results 1 to 10 of 10

Thread: post-boot in /usr/local/sbin/ doesn't seem to run after boot up

  1. #1

    Unhappy post-boot in /usr/local/sbin/ doesn't seem to run after boot up

    Dear all,

    I upgraded the firmware of my wl500g deluxe to the latest firmware v.1.9.2.7 CR3b by oleg. And I followed the instructions in the howto guide "WAN Webserver on port 80" to configure my post-boot with the following code.

    mount /dev/discs/disc0/part1 /tmp/harddisk -t ext3
    busybox_httpd -p 8080 -h /tmp/harddisk/web

    After I bootup the router, I excuted the command ps. But the busybox_httpd was not found.

    I tried to amend the post-boot as following:

    touch /usr/local/sbin/abc
    mount /dev/discs/disc0/part1 /tmp/harddisk -t ext3
    busybox_httpd -p 8080 -h /tmp/harddisk/web

    After bootup, the file /usr/local/sbin/abc was not found. It seems that the script post-boot was not executed at all.

    Remark : I did chmod +x post-boot.

    Am I doing anything wrong? May someone help me please? Thanks!

  2. #2
    Join Date
    Dec 2003
    Location
    Russian Federation
    Posts
    8,353
    Make sure your file starts with
    Code:
    #!/bin/sh

  3. #3
    If firewall is enable, post-firewall is executed instead of post-boot

  4. #4
    Join Date
    Apr 2004
    Location
    Netherlands
    Posts
    1,307
    Quote Originally Posted by hugo
    If firewall is enable, post-firewall is executed instead of post-boot
    No. Both are executed.

  5. #5

    Smile

    Thanks! It finally works.
    Quote Originally Posted by Oleg
    Make sure your file starts with
    Code:
    #!/bin/sh

  6. #6
    I'm trying to run stupid-ftp with a custom config, but I run into the same problem that post-boot is not executed (post-firewall is ignored as well).
    In the web interface, FTP is disabled.
    Some relevant output:
    Code:
    [admin@CPxxxxx-A /]$ cat /.version
    1.9.2.7-3b
    [admin@CPxxxxx-A /]$ cd /tmp/local/init
    [admin@CPxxxxx-A init]$ cat post-boot
    #!/bin/sh
    /usr/sbin/stupid-ftpd -f /usr/local/stupid-ftpd.conf
    echo 'Post-Boot processed' > /var/log/post-boot
    [admin@CPxxxxx-A init]$ ./post-boot
    [admin@CPxxxxx-A init]$ 
    [admin@CPxxxxx-A init]$ ls -lA
    -rw-r--r--    1 admin    root          174 Feb 14 20:32 .files
    -rwxr-xr-x    1 admin    root          111 Feb 14 22:01 post-boot
    -rwxr-xr-x    1 admin    root           71 Feb 14 22:01 post-firewall
    -rwxr-xr-x    1 admin    root           36 Jan 15 21:46 pre-boot
    If I run the post-boot manually (./post-boot), the log is created and the ftp daemon starts correctly.

    What is missing?

  7. #7
    post boot script must be in /usr/local/sbin/post-boot

  8. #8
    Quote Originally Posted by Styno
    No. Both are executed.
    Sorry for my mistake, I had a typo in my post-boot script, and I activated firewall at same time!
    I completly forgot about this message since then

  9. #9
    Quote Originally Posted by hugo
    post boot script must be in /usr/local/sbin/post-boot
    This is not what it said on the WIKI but it does seem to work a lot better.
    Maybe someone who completely undestands what's in there can look at it to fix it there? I'm willing to give it a try but might introduce new errors...
    Quote Originally Posted by http://wiki.wl500g.info/index.php/FlashfsBoot
    Once the boot process has been altered you can use it to customize your router. A number of scripts in the /usr/local/init directory can be used for this purpose:
    pre-boot
    post-boot
    post-firewall
    Last edited by Vaudtje; 19-02-2005 at 00:09.

  10. #10
    Join Date
    Dec 2003
    Location
    Russian Federation
    Posts
    8,353
    your script should be in the /usr/local/sbin, not init.

Similar Threads

  1. Start own script in post-boot or post-firewall
    By m-h-l in forum WL-500g Q&A
    Replies: 2
    Last Post: 30-09-2005, 20:03
  2. Howto run post-boot when ftp is off
    By Jethro in forum WL-500g Q&A
    Replies: 6
    Last Post: 27-08-2005, 22:54
  3. post-boot is not executed - what's wrong?
    By sbn in forum WL-500g Q&A
    Replies: 0
    Last Post: 11-06-2005, 13:17
  4. Shell scripts and post-boot
    By samoht in forum WL-500g Q&A
    Replies: 5
    Last Post: 04-06-2005, 00:58
  5. Replies: 3
    Last Post: 24-12-2004, 20:13

Posting Permissions

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