08-11-2011
How can we tweak the below script to get the preferred result?
If the entry "KEYBOARD_ALTERNATE=alternate" is not uncommented, then I should get a failure.
======================================================
# Verify alternate break signal is enabled on SUN systems.
#
if [[ `uname -s` != 'SunOS' ]] ; then
addskip "This is not SunOS so skip to check"
exit
fi
if [[ `grep "^KEYBOARD_ABORT\=alternate" /etc/default/kbd` != '' ]] ; then
addfailure "break signal not enabled"
else
addsuccess "break signal enabled"
fi
==========================================================
Thanks..
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
Hi,
Anyone please tell me the default ALOM username and password for the sun server(Sun fire V210).
Thanks
muthu (1 Reply)
Discussion started by: muthulingaraja
1 Replies
2. Shell Programming and Scripting
All, I need to write an unix shell script which inserts some records into a file located in remote servers.
* Get the input from the user and insert according the first row. It should be in ascending order.
123451,XA,ABA
123452,XB,ABB
123453,XC,ABC
123455,XE,ABE
123456,XF,ABF
123458,XG,ABG... (2 Replies)
Discussion started by: techychap
2 Replies
3. Shell Programming and Scripting
Hi,
I need Unix Shell Script Review Check list in the format of word or excel.
Can any one provide the review checklist for unix shell script. Pls. (1 Reply)
Discussion started by: praka
1 Replies
4. Shell Programming and Scripting
Dears,
need help on developing a script to monitor sun server temperature , I'm using the below command to check the servers one by one
/usr/platform/`uname -i`/sbin/prtdiag -v
Servers Models are :
2 x Sun SPARC Enterprise M9000 Server
4 x Sun Fire V490
2 x Sun Blade T6300 Server... (1 Reply)
Discussion started by: bejo4ever
1 Replies
5. Shell Programming and Scripting
HI all,
I want to script where all the server names will be in a text file like
server1
server2
server3 . and the script should take servernames from a text file and perform copy of files if the files are not present on those servers.after which it should take next servername till the end of... (0 Replies)
Discussion started by: joseph.dmello
0 Replies
6. Shell Programming and Scripting
Hi Folks,
I was given a task to append three IP's at the end of a specific (and unique) line within a file on multiple servers.
I was not able to do that with the help of a script. All I could was:
for i in server1 server2 server3 server4
do
ssh $i
done
I know 'sed' could be used to... (5 Replies)
Discussion started by: momin
5 Replies
7. Shell Programming and Scripting
Hi, I'm new to C Shell programming. I'm trying to check if a sym link exists on remote server if not send email. I'm not having much luck. Can anyone help?
Here is what I have written but it doesn't work. It tells me that my variable was not defined. Here is part of the script, the second... (0 Replies)
Discussion started by: CDi
0 Replies
8. Shell Programming and Scripting
Hi
I'd like to check that a bunch of firewall rules have been applied and, therefore, want to write a script that basically does the following:
telnet serverA port1
telnet serverA port2
telnet serverB port1
telnet serverB port2
I would just compile the list in excel and run it as a... (2 Replies)
Discussion started by: jibberish
2 Replies
9. UNIX for Dummies Questions & Answers
Hi Experts,
I am not good in writing script. Just stared.I am looking for shell script to check following parameters.
1) Number of files on remote Linux SUSE server.- Any directory and sub directory.
2) I should define number of files in script. Files should be variable.
3) Age of... (2 Replies)
Discussion started by: ApmPerfMonitor
2 Replies
10. UNIX for Beginners Questions & Answers
I'm required to write a simple shell script that when it runs it writes the output which is a simple barcode to a tmp flat file which I can do the bit I'm struggling with...
The next time it runs I need to check the tmp output file to see if that barcode is in the output file and if it is send... (5 Replies)
Discussion started by: worky
5 Replies
LEARN ABOUT HPUX
sigaltstack
sigaltstack(2) System Calls Manual sigaltstack(2)
NAME
sigaltstack - set and/or get signal alternate stack context.
SYNOPSIS
DESCRIPTION
The function allows a process to define and examine the state of an alternate stack for signal handlers. Signals that have been explicitly
declared to execute on the alternate stack will be delivered on the alternate stack.
If ss is not a null pointer, it points to a structure that specifies the alternate signal stack that will take effect upon return from The
ss_flags member specifies the new stack state. If it is set to the stack is disabled and ss_sp and ss_size are ignored. Otherwise the stack
will be enabled, and the ss_sp and ss_size members specify the new address and size of the stack.
The range of addresses starting at ss_sp, up to but not including ss_sp+ss_size, is available to the implementation for use as the stack.
This interface makes no assumptions regarding which end is the stack base and in which direction the stack grows as items are pushed.
If oss is not a null pointer, on successful completion it will point to a structure that specifies the alternate signal stack that was in
effect prior to the call to The ss_sp and ss_size members specify the address and size of that stack. The ss_flags member specifies the
stack's state, and may contain one of the following values:
SS_ONSTACK The process is currently executing on the alternate signal stack. Attempts to modify the alternate signal
stack while the process is executing on it fails. This flag must not be modified by processes.
SS_DISABLE The alternate signal stack is currently disabled.
The value is a system default specifying the number of bytes that would be used to cover the usual case when manually allocating an alter-
nate stack area. The value is defined to be the minimum stack size for a signal handler. In computing an alternate stack size, a program
should add that amount to its stack requirements to allow for the system implementation overhead. The constants and are defined in
After a successful call to one of the functions, there are no alternate signal stacks in the new process image.
RETURN VALUE
Upon successful completion, returns 0. Otherwise, it returns -1 and sets to indicate the error.
ERRORS
The function will fail if:
[EINVAL] The ss argument is not a null pointer, and the ss_flags member pointed to by ss contains flags other than
[ENOMEM] The size of the alternate stack area is less than
[EPERM] An attempt was made to modify an active stack.
WARNINGS
At HP-UX release 11i Version 1.6 and forward, use of in threads created with process contention scope will result in undefined behavior.
This function will continue to be reliable in threads created with system contention scope.
APPLICATION USAGE
The following code fragment illustrates a method for allocating memory for an alternate stack:
In some implementations, a signal (whether or not indicated to execute on the alternate stack) will always execute on the alternate stack
if it is delivered while another signal is being caught using the alternate stack.
On some implementations, stack space is automatically extended as needed. On those implementations, automatic extension is typically not
available for an alternate stack. If the stack overflows, the behavior is undefined.
Threads Considerations
Each thread may define an alternate signal handling stack.
LWP (Light Weight Processes) Considerations
Each LWP may define an alternate signal handling stack.
SEE ALSO
sigaction(2), setjmp(3C), <signal.h>.
CHANGE HISTORY
First released in Issue 4, Version 2.
sigaltstack(2)