Shutting down a Sun System with a Shell Script

Steve Rumsby steve at MATHS.WARWICK.AC.UK
Sat Dec 17 04:14:28 AEST 1988


ado at ncifcrf.gov writes:
> STELLABO at CSHLAB.BITNET writes:
> > Is there anyway to. . .
> >         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. . .
>
> No.  A quick look reveals that. . .
>   Script started on Wed Nov 23 17:19:42 1988
>   elsie$ /bin/ls -l /etc/umount /etc/dump
>   lrwxrwxrwx  1 root           15 Oct 11 15:40 /etc/dump -> ../usr/etc/dump
>   lrwxrwxrwx  1 root           17 Oct 11 15:40 /etc/umount ->
 ../usr/etc/umount
>   elsie$ exit
>   script done on Wed Nov 23 17:19:53 1988
> ...
> To make things work right, Sun would at least get to move dump and umount
> to /sbin.

Yes, I didn't like the looks of this when I was installing 4.0. I mean,
what happens if my /usr partition gets trashed? Install from the tapes and
have to fix all the bugs and security holes again (1/2 :-). No thanks.

Fortunately, due to the by now famous suninstall bug which causes it to
crash on a serial console, and the fact that I didn't know about the fix,
I ended up installing by hand. So when building my root file system I
copied everything in sight from the munix root, which means I've got dump,
restore, mount, umount, ls, mv, cp, etc, etc all on my root file system,
along with all the relevant dynamic library stuff to make them work.

A small trick is required though. Because /bin and half (or more?) of /etc
are symbolic links into the /usr partition when it is mounted, I have
/usr/bin, /usr/etc, /usr/lib directories in my root filesystem which get
hidden when a working /usr is mounted. But if I don't have one, the
symbolic links then point to the versions on the root filesystem instead
and I can still do useful things.

Of course my root filesystem is a bit (well, OK, a lot) bigger than
normal, but that is a small price to pay.

	Steve.

--
UUCP:     ...!ukc!warwick!steve        Internet: steve at maths.warwick.ac.uk
JANET:     steve at uk.ac.warwick.maths    PHONE:     +44 203 523523 x2657



More information about the Comp.sys.sun mailing list