OpenWrt Forum Archive

Topic: how to modify /etc/init.d/boot for a custom image ?

The content of this topic has been archived on 30 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Here's a quick version of the situation-
Big picture issue: I sometimes see that syslogd and klogd stop running, and would like to have them automatically restarted when this happens.

Problem: after installing a custom image with a custom version of /etc/init.d/boot, the router does not respond to pings and I can't ssh into it.


And here's a longer version of what's going on-

To try and get better reliability from syslogd and klogd, I'm trying to use busybox's runit utilities to monitor and restart these programs. I've been able to get this to work by making manual edits to an already-installed stock version of the /etc/init.d/boot script. This involves commenting-out two lines from that file like this

#    [ -x /sbin/syslogd ] && syslogd -C${log_size:-16} ${log_ip:+-L -R $log_ip${log_port:+:$log_port}}
#    [ -x /sbin/klogd ] && klogd

and then creating scripts so that runit can start them (eg. /service/syslogd/run and /service/klogd/run )

As a next step, I want to create a custom image that contains these changes so I don't need to manually implement them. To do this, I create the necessary files in the openwrt's working directory's files/ subdirectory, run "make world" and then install the image on my router. But after rebooting, the router doesn't respond to pings or any other requests. The light is on, but the networking doesn't seem to work.

What can I do to get my changes to /etc/init.d/boot implemented?
Or is there a better way to improve reliability of syslogd and klogd?

I'm running 8.09.1, brcm-2.4 version on an asus 520gu. Please let me know if I should include more information about my setup.

thanks
Dan

Have you checked whether some command in your modified /etc/init.d/boot blocks the execution of subsequent init scripts?

~ JoW

jow wrote:

Have you checked whether some command in your modified /etc/init.d/boot blocks the execution of subsequent init scripts?

~ JoW

I just tried to check for that, but didn't see anything. This could b e because I'm not sure what that would look like.

Is it possible that there is a problem with trying to use this /etc/init.d/boot script at FIRST BOOT ? Could it be interfering with some special tasks that get done during that time?

The discussion might have continued from here.