PDA

View Full Version : Is it possible to call a script from knoppix.sh?



coloringb
10-07-2011, 01:01 AM
Hi all, I am new to Knoppix, recently I downloaded v6.7 and put it to PXE. I am wondering is it possible to call a script from knoppix.sh? I tried to put the path of my new script in knoppix.sh, and chmod+x the new script, but after knoppix booted up the new script won't execute. Thanks

I have the default settings file myconf=scan

knoppix.sh command:
#!/bin.sh
echo "Hi knoppix"
sh /tftpboot/KNOPPIX/test.sh
echo "Bye knoppix"

Outcome:
Executing /mnt/system/KNOPPIX/knoppix.sh
Hi knoppix
sh: can't open 'tftpboot/KNOPPIX/test.sh'
Bye knoppix
INIT:Entering runlevel:3

kl522
10-07-2011, 06:16 AM
knoppix.sh command:
#!/bin.sh
echo "Hi knoppix"
sh /tftpboot/KNOPPIX/test.sh
echo "Bye knoppix"

Outcome:
Executing /mnt/system/KNOPPIX/knoppix.sh
Hi knoppix
sh: can't open 'tftpboot/KNOPPIX/test.sh'
Bye knoppix
INIT:Entering runlevel:3

Is there any typo error ?
It should probably be :-

sh: can't open '/tftpboot/KNOPPIX/test.sh'
( leading slash is missing from your post )

Also the '#!/bin.sh' should be '#!/bin/sh'.

If that's the case check the file permission of /tftpboot and /tftpboot/KNOPPIX, it should be r_x for the person wanting to access it. Another possibility is the directory /tftpboot/KNOPPIX does not even exist. You can try to use the cheatcode 'debug' to help you.