Shutting down a Sun System with a Shell Script

Paul Allen bcsaic!paula at june.cs.washington.edu
Tue Dec 13 02:19:22 AEST 1988


stellabo at 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 at boeing.com
Boeing Advanced Technology Center   | ...!uw-beaver!ssc-vax!bcsaic!paula



More information about the Comp.sys.sun mailing list