Tiny Core Base > TCB Q&A Forum

bootlocal.sh is executed before extensions are loaded?

(1/1)

jvalencia:
I'm using copy2fs.flg so that means that at boot, extensions are copied to fs.

I supposed that copying happened before executing bootlocal.sh but I've found that my wlan module isn't loaded at the moment.

I know I can insert a sleep in the script, but it's ugly.

How would you implement a hook so the script is only run after the module is loaded?

How can I know if all extensions have already been copied in case I need one for my script?

Thanks

Misalf:
bootlocal.sh  is executed  after  extensions are loaded or copied to RAM.

Why is sleep ugly?
bootlocal.sh runs in background so you shouldn't notice any delay.

However, you can also do

--- Code: ---{ sleep 2 ; /your/script ; } &

--- End code ---
or

--- Code: ---for i in `seq 10 -1 0` ; do
if [ -e /sys/class/net/wlan0 ] ; then
/your/script &
break
fi
sleep 1
done


--- End code ---

jvalencia:

--- Quote from: Misalf on July 30, 2016, 06:42:31 AM ---bootlocal.sh  is executed  after  extensions are loaded or copied to RAM.

Why is sleep ugly?
bootlocal.sh runs in background so you shouldn't notice any delay.

However, you can also do

--- Code: ---{ sleep 2 ; /your/script ; } &

--- End code ---
or

--- Code: ---for i in `seq 10 -1 0` ; do
if [ -e /sys/class/net/wlan0 ] ; then
/your/script &
break
fi
sleep 1
done


--- End code ---

--- End quote ---

Yes, it's the module that is not autoloaded in time. I suppose I can manually load it from the script or just wait for
the interface to appear, like your script.

Navigation

[0] Message Index

Go to full version