busybox start init script after bootup

user1320852 picture user1320852 · Sep 23, 2012 · Viewed 12k times · Source

i am running an embedded linux device with busybox. after boot i want to start the ppp connection and do other things. i want to run it when everything else has finished and the system is up.

my inittab looks like:

::sysinit:/bin/sh /etc/rc.d/rc.sysinit
::once:/bin/sh /flash/scripts/init.sh
::respawn:/sbin/getty -L ttyS0 115200 vt100

the script is executed and pppd get started but it fails. if i run the command manually after bootup, there is no problem at all. so i thought maybe its the runlevel?

Answer

challinan picture challinan · Sep 24, 2012

Most likely, your ppp daemon is dependent on something that gets started in rc.sysinit, and it tries to startup up before that dependency has completed loading. Take sawdust's suggestion - start your init.sh script (ppp) from rc.sysinit after everything else finishes.