AIX

AIX

Connect with fellow AIX users and experts to gain knowledge, share insights, and solve problems.


#Power
 View Only
  • 1.  Adding a script to startup/shutdown of AIX

    Posted Mon October 09, 2006 10:14 AM

    Originally posted by: Wieckowski


    Hello, I would like to add a startup/shutdown script to AIX.
    Thought I should use the rc2.d directory for this rather than inittab.
    Question, I need to run this script as a "non-root" user, Any thoughts on how I best should accomplish this? Thanks very much.
    #AIX-Forum


  • 2.  Re: Adding a script to startup/shutdown of AIX

    Posted Tue October 10, 2006 07:07 AM

    Originally posted by: steevojb


    Hi

    su - <user> -c /command/to/run.sh

    HTH

    Steve
    #AIX-Forum


  • 3.  Re: Adding a script to startup/shutdown of AIX

    Posted Tue October 10, 2006 07:32 AM

    Originally posted by: Wieckowski


    Thanks you for the response.
    #AIX-Forum


  • 4.  Re: Adding a script to startup/shutdown of AIX

    Posted Tue October 10, 2006 09:13 AM

    Originally posted by: SystemAdmin


    As well as the suggestion to use su for this you might want to put the non-root command invocation into /etc/rc.shutdown. This script, if it exists, is run at the start of a normal system shutdown. It makes for a common place to put all shutdown related stuff.

    HTH

    Jim Lane
    #AIX-Forum