It is currently Fri, 01 Aug 2014 17:22:08 GMT



 
Author Message
 shutdown script
Zhu Xiang Yong <xy...@ncs.com.sg> wrote:

One of the first thing that "shutdown" does is look for the existence
of /etc/shutdown.rc (I think, have a look at shutdown - which is a
script).
Create /etc/shutdown.rc and put your shutdown commands in there. Be
aware that if /etc/shutdown.rc exits with a non-sero return code the
shutdown will hang.

Ted.
==============================================================
| Ted Linnell                     <edlinn...@acslink.net.au> |
| BSc GradDipDP CNA MACS PCP                                 |
| Nunawading, Victoria , Australia                           |
==============================================================



 Sat, 14 Apr 2001 03:00:00 GMT   
 shutdown script
i believe shutdown calls /etc/rc.shutdown.  another way to do it would be
to alias shutdown to run you script && call shutdown.  /etc/rc.shutdown is
of course the preferred method...

Orphy! :-)
Dallas, TX

In article <36357c87.1097...@news.mpx.com.au>,



 Sat, 14 Apr 2001 03:00:00 GMT   
 shutdown script
In article <36357c87.1097...@news.mpx.com.au>,

BEWARE - NOT ALL VERSIONS OF AIX CHECK FOR /etc/rc.shutdown.

It appears that AIX 414 and 421 have a test for /etc/rc.shutdown in
/usr/sbin/shutdown, but by default AIX 415 does not.

You need to check /usr/sbin/shutdown (it is a kornshell script) and if
necessary add something like:

if [ -x /etc/rc.shutdown ]
      then
          sh /etc/rc.shutdown
          if [ $? -ne 0 ]
               then
                  dspmsg -s 1 shutdown.cat 60 \
                  "/etc/rc.shutdown failed.  Shutdown aborting.\n"
                  exit 1
          fi
fi

somewhere around line 870 - where it does the test for /etc/netware.clean

NOTE: I did not write this - it was done by the previous sysadmin here.  It
does work though and I have made similar changes on other systems in the
past.

Cheers,

Dominic

Dominic Hill
AIX and RS/6000 SP Specialist
Parallix Consulting Ltd.

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    



 Sun, 15 Apr 2001 03:00:00 GMT   
 
   [ 3 post ] 

Similar Threads

1. /usr/ucb/shutdown & Shutdown scripts

2. Shell script help, shutdown script

3. Shutdown Script

4. startup and shutdown script

5. startup / shutdown scripts

6. shutdown script

7. Solaris 8 shutdown script - question

8. System startup/shutdown scripts logs

9. Startup Shutdown scripts

10. startup & shutdown scripts


 
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software