Usually this is because some user (maybe root) has some stty commands in their .profile or .bash_profile or .bashrc, usually something like stty erase ^H.
You can safely ignore those messages, however if you like to be tidy you can prevent them from coming up by changing them as follows:
# only use stty if stdin is a terminal
[[ -t 0 ]] && stty erase ^H
It is a good idea to do this as well if you have some software that analyses the output of some commands and does not expect these "stty:standard input:invalid argument" messages.
%prep is not the same as %pre... maybe there is no %pre section?
It's possible that the %{pdsdir}/shell/COMPONENT/postinstall or .../configure are causing those error messages; have you checked them for stty or su username -c '...' commands?
/bin/basename /opt/avaya/pds/shell/MTDBASE/configure
+ FNAME=configure
+ print 'NOTE: Executing MTDBASE "configure"'
/opt/avaya/pds/shell/MTDBASE/configure: line 279: print: command not found
+ case $FNAME in
+ configure
+ exitval=0
+ su - admin -c /opt/avaya/pds/etc/start_db
stty: standard input: Invalid argument
stty: standard input: Invalid argument
stdin: is not a tty
stty: standard input: Invalid argument
Well this is obviously the part that is causing the problem:
+ su - admin -c /opt/avaya/pds/etc/start_db
stty: standard input: Invalid argument
stty: standard input: Invalid argument
stdin: is not a tty
stty: standard input: Invalid argument
So have a look at the admin user's profile scripts, that is probably where you will find the stty commands. You can safely ignore those errors if you wish, but they look messy. You could also consider removing the - from the su command if you don't really need to load that user's profile. It is also possible, but unlikely, that the stty commands are in the start_db script.
Note also this error:
+ print 'NOTE: Executing MTDBASE "configure"'
/opt/avaya/pds/shell/MTDBASE/configure: line 279: print: command not found
print is a ksh-specific command, so if your scripts are not going to run under ksh then you should use echo instead.
I need to run start_db and other script as admin user
I changed admin profile where stty command as follow
if [ -t 0 ]
then
stty erase \^h kill \^u intr ^C
fi
but still got the same errors
stty: standard input: Invalid argument
stty: standard input: Invalid argument
stdin: is not a tty
stty: standard input: Invalid argument
One thing is sure that because of admin user profile loaded when these script are running thats why errors occurs.I checked that by removing - from su admin. But I want to run these scripts as admin user thats my requiremnts