PDA

Bekijk de volledige versie : post-boot in /usr/local/sbin/ doesn't seem to run after boot up



norrisze
25-01-2005, 09:08
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!

Oleg
25-01-2005, 12:25
Make sure your file starts with


#!/bin/sh

hugo
25-01-2005, 12:56
If firewall is enable, post-firewall is executed instead of post-boot

Styno
25-01-2005, 13:27
If firewall is enable, post-firewall is executed instead of post-boot
No. Both are executed.

norrisze
25-01-2005, 14:38
Thanks! It finally works.

Make sure your file starts with


#!/bin/sh

Vaudtje
14-02-2005, 21:14
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:


[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?

hugo
15-02-2005, 09:01
post boot script must be in /usr/local/sbin/post-boot

hugo
15-02-2005, 09:02
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

Vaudtje
18-02-2005, 17:19
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...


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

Oleg
18-02-2005, 19:42
your script should be in the /usr/local/sbin, not init.