× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



I'm getting a little somewhere with this.

In AIX there's a file called /etc/inittab
In /etc/inittab there is a line which goes:

powerfail::powerfail:/etc/rc.powerfail 2>&1 | alog -tboot > /dev/console #
Power
Failure Detection

Keeping in mind that I am totally ignorant on these kinds of scripting but
I'm going with, when a power failure occurs then execute /etc/rc.powerfail

I poured over this /etc/rc.powerfail script. It ends up with
# more /etc/inittab
# more /etc/rc.powerfail
#
# 0 - No system shutdown/halt
# 1 - Platform specific command failed
#
############################################################

sys_type=`/usr/sbin/bootinfo -p`

# We support only CHRP architectures, from AIX 5.3. Hence,
# the below case strucuture will currently be implemented
# only with chrp.

case $sys_type in
"chrp")
/usr/lib/boot/bin/rc.powerfail_chrp $*
if [ $? -eq 0 ]
then
exit 0
else
exit 1
fi
;;
esac


So I then looked at this /usr/lib/boot/bin/rc.powerfail_chrp script.
There are some comments in here like:
# This script will perform the following general actions for each
# of the time periods allowed.
#
#
# Time Period Default Action
# =========== ==============
# immediate off No action
# 20 seconds sync the system
# 10 minutes warn the user and halt the system at the
# end of 10 min.
# Normal State No action


Way down I see this:

# set default values
integer time=10 # default time to system shutdown
integer waittime=10 # default time to wait for completion of
# customer scripts
integer ext_sleep=0 # extra wait time, in case -c option is set
integer tot_sec=0 # total seconds to wait before system
shutdown

So, is this their version of QUPSDLYTIM? Well, maybe not. Later on I
see:
t)
tmp_time=$OPTARG # change the time to shutdown
case $tmp_time in

+([0-9]))
time=$tmp_time
;;

*)
send_msg 20
send_msg 1
time=10
;;


c)
tmp_time=$OPTARG # change the time to wait
case $tmp_time in

+([0-9]))
waittime=$tmp_time
;;

*)
send_msg 28
send_msg 1
waittime=10
;;




Rob Berendt

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.