Path: utzoo!utgpu!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!cornell!uw-beaver!rice!sun-spots-request From: bcsaic!paula@june.cs.washington.edu (Paul Allen) Newsgroups: comp.sys.sun Subject: Re: Shutting down a Sun System with a Shell Script Message-ID: <8918@bcsaic.UUCP> Date: 12 Dec 88 16:19:22 GMT References: <8811102135.AA09427@rice.edu> Sender: usenet@rice.edu Organization: Rice University, Houston, Texas Lines: 28 Approved: Sun-Spots@rice.edu Original-Date: 1 Dec 88 01:54:04 GMT X-Sun-Spots-Digest: Volume 7, Issue 48, message 8 of 12 stellabo@cshlab.BITNET writes: >Is there anyway to perform the following steps in a shell script from >crontab on a Sun 3/280s file server: > > 1) Bring the system down to single user with the Shutdown Command > 2) umount the /usr file systems > 3) Perform a level (1-9) on the /usr file system > 4) Re mount the file systems. > 5) Bring the computer up in multi user. How 'bout this? Modify your /etc/rc script so that just before going multiuser, a test is made for the existence of a flag file in /etc. Something like 'dumpflag'. If the file exists, it is removed and dumps are performed. Now, to initiate dumps, your script that is started from crontab merely creates the flag file and reboots the system with shutdown(8) or reboot(8). I experimented with a scheme like this a long time ago to the point that I was convinced it could work. I never put it into production, however, since it's so much easier to just do dumps in the middle of the night with the systems up and running. Haven't had any problems in a year of doing multi-user dumps. Note: If any wizards out there can poke holes in my suggested single-user-dump-from-crontab scheme, I'm all ears! Paul -- Paul L. Allen | paula@boeing.com Boeing Advanced Technology Center | ...!uw-beaver!ssc-vax!bcsaic!paula