- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Shutdown script
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-23-2000 09:32 AM
08-23-2000 09:32 AM
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-23-2000 09:40 AM
08-23-2000 09:40 AM
Re: Shutdown script
Its not a good idea, at least the way I did it, I used rdist thinking it would do the job in parallel but it didnt and it took ages, great fun though! when you realize it will take to much time and its fatster by connecting yourself on all machines to reboot.
It will wait for the system to come up again and shut it down again...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-23-2000 09:41 AM
08-23-2000 09:41 AM
Re: Shutdown script
There must be some UPS in use because if not and power is lost, the systems would not have power and the script would not run.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-23-2000 09:45 AM
08-23-2000 09:45 AM
Re: Shutdown script
If you still want to automate it, schedule a cron job in each machine that is doing the shutdown at... condition.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-23-2000 10:03 AM
08-23-2000 10:03 AM
Re: Shutdown script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-23-2000 10:25 AM
08-23-2000 10:25 AM
Re: Shutdown script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-23-2000 10:33 AM
08-23-2000 10:33 AM
Re: Shutdown script
I'm not sure about exactly topic, but for sure, here in forum they were discutions about shutdown. Do a search in forum for shatdown as a search key... It might give you a better idea....
Good luck.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-23-2000 10:41 AM
08-23-2000 10:41 AM
Re: Shutdown script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-23-2000 11:00 AM
08-23-2000 11:00 AM
Re: Shutdown script
First, you need a machine setup to monitor the UPS and invoke another script to command a shutdown on the effected machines. How this is scripted is largely dependent on the communication requirements of the UPS. The monitoring script should be running as root. The command shutdown script should read a list of configured hosts and remsh a remote command on all the hosts. Be sure to spawn these off as background tasks so that they all process in parallel (make sure your kernel configuration can handle 100 spawned processes too). I prefer to have a script invoked on the remote machine which does the actual shutdown command instead of trying to pass arguments through with remsh. This allows you to tailor the script on the remote system for the needs of the particular machine and will work in an environment of different machine flavors (HPUX, Linux, etc). This script should be owned by root and not visible to other users. You are probably better off setting up trusts for remsh instead of trying to maintain an ever changing list of passwords.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-23-2000 06:05 PM
08-23-2000 06:05 PM
Solution1. Setup /var/adm/inetd.sec and CLOSE everything to unknown hosts. Most things can be closed for local hosts too, but....(It is better to use TCP Wrappers, but inetd.sec is already there!)
2. Setup a /.rhosts on each machine, with a single entry for the master server which will issue the shutdown command.
3. Make a list by OS of hosts which need to be rebooted.
4. Make the script, which knows each OS shutdown command. Like
down.hp=`/etc/shutdown -hy now`
down.sun=`/sbin/init 0'
Then loop the commands by OS.
for HOST in `cat down.hp` ;do
remsh $HOST "$down.hp"
done
for HOST in `cat down.sun` ; do
remsh $HOST "$down.sun"
done
Of course this very rough, and could be cleaned up as well. Also, root must allowed to enter without console on SunOS as well.
ANyway, the idea works, but is not very secure. As someone else mentioned, make sure root is the only one who can see, and excecute the script, and lists. Also, log the script like crazy! "I'd hate to be the test site for this one! :)
Best regards,
Shannon
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-24-2000 02:29 AM
08-24-2000 02:29 AM
Re: Shutdown script
You have to replace the getws script which is a selfmade script to get the desired hostnames.
Also the script isdead just tests if the Workstation is alive (this saves some time).
What the script does is pretty simple.
- get a list of workstations to shutdown
- test if the workstation is alive
- kill any process you wish
- shutdown the workstation except myself
- at least shutdown the workstation this script is running on.
Keep in mind what the others said about security.