Hi Curaga,
Not sure what book you mean, and hence, that "chapter" eludes me as well.
My apology. I try to be psychic - my sister drilled that into me,
but it doesn't always work as planned.
What I do know is that to accomplish something
sometimes you just have to spend 100 - 1000 hours
and keep poking around.
So...instead of banging my head on a wall on the Wiki
I went to YOUTUBE - yeah team...
and found a simple video and came up with this.
Hope it helps others...and saves them
the 1000 plus hours I had invested
over the years...
...trying to get a script to run on boot...
...and making their own TCZ.
Both problems appear solved now.
1. A YouTube video taught me enough
to make this script to automate
building a tcz that worked.
#!/bin/sh
tce-load -i squashfs-tools-4.x.tcz
cd /home/tc
# create the file structure that will hold your tcz
# change the name mylittle to the name of your package
# throughout this script
sudo mkdir -p /home/tc/mylittle/usr/local/tce.installed
cd /home/tc/mylittle/usr/local/tce.installed
# a tcc compiled C program that simply shells a system call to run a shell script
cp /mnt/sdb1/tinycutils/mylittle .
# a shell script that simply echos a HELLO message to a log file in the tmp folder
cp /mnt/sdb1/tinycutils/mylittle.sh .
sudo chmod a=rwx *
# probably should just be rx...but...
cd /home/tc
sudo echo hi >mylittle.tcz
sudo rm mylittle.tcz
# pack it all up
mksquashfs mylittle/ mylittle.tcz
# dump it in optional with other tczs
cd /mnt/sda1/tce/optional
cp /home/tc/mylittle.tcz .
# Then add it to onboot.lst
# ALL DONE
2. BEFORE running this you will need
a simple C program
and a simple shell script.
Folks probably don't need the
C program, but this worked fine.
mylittle.c was
#include <stdio.h>
#include <stdlib.h>
/* #################################### */
main(int argc, char** argv)
{
system("sh /usr/local/tce.installed/mylittle.sh");
exit(0);
}
and mylittle.sh shell script was simply:
#!/bin/sh
sudo echo HELLO >/tmp/mylittle.log
3. If you want the shell script to do
something else (like load extensions,
do a backup, find a file or open a browser)
simply add more instructions.
ALL DONE
Hope this helps.