PDA

View Full Version : Run a simple script after boot completion



zvivered
12-05-2009, 06:12 AM
Hello,

I installed knoppix on a USB disk and it boots OK.

Upon boot completion I want knoppix to automatically run a simple script.

According to documentation, I opened minirt.gz using:
gunzip minirt.gz
mkdir minirtdir
cd minirtdir
cpio -ivu --no-absolute-filenames < ../minirt

I got the complete tree under minirtdir.

Then I added an 'rc2.d' folder under /etc and created a link to a script located in /etc/init.d

Then I compressed back to minirt.gz using:
find . | cpio -oH newc | gzip -9 > ../minirt.gz

and booted the PC with BOOT_IMAGE=linux 2

But upon boot completion, my script was not run. I didn't find any files I created under /etc/init.d or /etc/rc2.d
What am I doing wrong ?

Thanks.

zvivered
12-11-2009, 12:42 PM
I was advised in the maillist to add a script to /etc/init.d (MyScript) and a link to this script named S90MyScript in /etc/rc2.d