Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

solaris10: launch script at GUI login screen?

Status
Not open for further replies.

ilovesolaris10

Programmer
Joined
Jun 15, 2006
Messages
2
Location
US
In solaris10 update 1, is there a way to launch a script once the GUI login screen comes up?

The script I want to launch is simple and only contains "poweroff", so what I want is for the server to start up, hit the login, and then power off.

Right now I have added /etc/rc3.d/S99shutdown that contains "#!/bin/sh; poweroff" and it seems like this gets called right as the GUI is being fired up, but the poweroff is faster, so no GUI ever actually shows.

I really don't have to have the GUI, but what I do want is to be sure that my shutdown script is happening as late as possible in the boot process. Ideally, it would be the last thing to run.
 
Why not stick a sleep in the S99shutdown script, or use shutdown -i5 -g15 -y?

Annihilannic.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top