mounted ext2 fs causes bad shutdown

Loren M. Lang lorenl at
Wed Feb 2 01:52:00 PST 2005

On Tue, Feb 01, 2005 at 07:58:34AM -0600, Eric Kjeldergaard wrote:
> > > One of the many ways to do the same thing without the bugs could be:
> > >
> > > #       extfs=$(mount | grep '^/.*(ext2fs,' | awk '{print $1}')
> > 
> > Actually, better than that would be extfs=$(mount -t ext2fs | awk '{print $1;}')
> > Or even just replace the whole thing with "umount -a -t ext2fs"
> > 
> While we're at it, isn't awk a bit of overkill?  Seems that the
> following would do:
> extfs=$(mount -t ext2fs | cut -d ' ' -f1)

How about save a few more bytes and do:

extfs=`mount -text2fs|cut -d\  -f`

But "umount -a -text2fs" is the shortest version since it doesn't even
need a loop, it does everything in one command.
> Every cycle counts :p
> -- 
> If I write a signature, my emails will appear more personalised.

I sense much NT in you.
NT leads to Bluescreen.
Bluescreen leads to downtime.
Downtime leads to suffering.
NT is the path to the darkside.
Powerful Unix is.

Public Key:
Fingerprint: B3B9 D669 69C9 09EC 1BCD  835A FAF3 7A46 E4A3 280C

More information about the freebsd-questions mailing list