Subject: Re: pre-command in rc scripts
To: C?sar Catri?n C. <ccatrian@eml.cc>
From: David Laight <david@l8s.co.uk>
List: netbsd-help
Date: 02/03/2005 19:03:52
On Wed, Feb 02, 2005 at 06:08:43PM -0300, C?sar Catri?n C. wrote:
> I need a 'legal' way in the rc scripts to add a 'pre'-command, like ktrace,
> su or another utility that take a $command as an argument.

If you need to get a ktrace for a program that is started by a script
and/or another program - ie where it is difficult to modify the argument
list - you can use:

# cd directory_where_program_binary_is
# mv progam_binary program_binary.real
# cat >program_binary <<EOF
#! /bin/sh
exec ktrace -o log_file full_path_to_program.real "$@"
EOF
#

Dunno if this will help.....

	David

-- 
David Laight: david@l8s.co.uk