aha/aha/ihook.sh
Gerard Wagener 0741943282 AHA captures now insults typed by a user
The ihook.sh must be set in the global bash.rc
The hook is needed to pass invalid commands already fetched by bash to kernel space which are then transfered to the daemon
2010-10-26 14:24:22 +02:00

44 lines
616 B
Bash

command_not_found_handle() {
echo $1
ARGS=""
if [ ! -z "$1" ]; then
ARGS="$ARGS$1"
fi
if [ ! -z "$2" ]; then
ARGS="$ARGS $2"
fi
if [ ! -z "$3" ]; then
ARGS="$ARGS $3"
fi
if [ ! -z "$4" ]; then
ARGS="$ARGS $4"
fi
if [ ! -z "$5" ]; then
ARGS="$ARGS $5"
fi
if [ ! -z "$6" ]; then
ARGS="$ARGS $6"
fi
if [ ! -z "$7" ]; then
ARGS="$ARGS $7"
fi
if [ ! -z "$8" ]; then
ARGS="$ARGS $8"
fi
if [ ! -z "$9" ]; then
ARGS="$ARGS $9"
fi
/sbin/user_insult $ARGS
}