PDA

View Full Version : configs.tbz/knoppix.sh related error message on boot



gadgerama
05-14-2005, 08:12 PM
Hi all, just started using 3.8.1 as a pmi. I get the following msg when booting after using the myconfig=/mnt/hdb3 cheat code:

All appears normal throughout the boot process until after the 'extracting config archive /mnt/hdb3/configs.tbz ... '

The following msg then appears in gray:

/mnt/hdb3/knoppix.sh: line 11: 1819 terminated pump -i$DEVICE >/dev/null 2> &1

Then everything carries on as normal, and my config settings are loaded up. Any ideas as to what's causing this? TIA.

jjmac
05-16-2005, 11:45 AM
Hi,

>>
>/dev/null 2> &1
>>

change to ...

>/dev/null 2>&1

It's probably the space between the '2>' and the '&'.

The shell will see that as a field seperator/termination, and get confused as to where you want the redirection to actually go.


jm




-:- If the system is the answer, then the question
must have been really stupid -:-

gadgerama
05-16-2005, 04:41 PM
Thx for the response. As far as I was aware I wasn't redirecting it at the time (I certainly wasn't typing anything in except the myconfig cheat code. Anyway, I now save myconfig to a different location and for the moment, it's not giving me any more messages. Don't know how long it will last though .. :-)

jjmac
05-18-2005, 12:11 PM
>>
-i$DEVICE >/dev/null 2> &1
>>

The shell will see $DEVICE as a variable to expand(macro),

the shell will interpret >/dev/null to mean you want the output to go to the abyse. Often used when all the script wants is the return status of the command, the 2> &1 is where the error was. The shell would normally expect it to read 2>&1 interpreting it to mean that you also want the standard error to be redirected to the standard output, and they can both go to the abyse.

Especially if the comand is being run in an non-interactive shell, which it probably is.

The error is just the "space" character. Which will be seen as a field seperator.

try in a term window ...

]$ ls /dev/null
]$ ls /dev/null 2>&1
]$ ls /dev/null 2>
]$ ls /dev/null 2> &1

notice the messages.

Not sure how it is being used in the script concerned, but it will cause it to fall over at that point.

Just needs a minor edit :)


jm




-|- If the system is the answer, then the question
must have been really stupid -|-