PDA

View Full Version : Creating a custom cheatcode



Ambrose
02-02-2004, 11:58 PM
Is it possible to create my own cheatcode?

I basically want the user to be able to type in : knoppix user1 OR knoppix user2 or something like that.

knoppix user1 would combine the noeject, and the noscsi option
knoppix user2 would combine the noeject, noscsi, and nosound options
Just an example.

I would also like to be able create a cheatcode that runs a specific shell script. Eg: knoppix script1 would run /etc/init.d/ssh start
while knoppix script2 would run /etc/init.d/apache start, for example

Any ideas?


- Ambrose

clumsy
02-03-2004, 12:47 AM
Hi @all!

I'm interested in the same things!! Especially in loading various configurations for different boot-parameters!

Is this possible?
THX
clumsy

-DKL-
02-03-2004, 01:40 AM
Sure it's possible but it will take some time and work on your part... in brief:

1) learn how to remaster the Knoppix CD... there is info in DOCS and the forums on this site as to how you do this

2) dig into the main startup script for Knoppix where most of the work gets done... this is the /etc/init.d/knoppix-autoconfig script. This is where most of the boot codes are checked and various startup actions taken based on those. You will need to be a pretty capable BASH script writer to make the mod's you need. Once changed, you will then need to burn a new CD based on the changed Knoppix directory structure.

Hope that leads you into the direction you need....

Ambrose
02-03-2004, 01:50 AM
Excellent! That is exactallu the answer I was looking for.

I was afraid that the cheetcodes where build into the kernel.

Thanks,

- Ambrose