changeset 3785:c96cd40a7bda

6431414 fsckall shouldn't check clean FS
author as158974
date Fri, 09 Mar 2007 08:27:29 -0800
parents 6185c931da0c
children 59f947543bd9
files usr/src/cmd/fs.d/ufs/fsckall/fsckall.sh
diffstat 1 files changed, 15 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/usr/src/cmd/fs.d/ufs/fsckall/fsckall.sh	Fri Mar 09 07:28:43 2007 -0800
+++ b/usr/src/cmd/fs.d/ufs/fsckall/fsckall.sh	Fri Mar 09 08:27:29 2007 -0800
@@ -3,9 +3,8 @@
 # CDDL HEADER START
 #
 # The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License").  You may not use this file except in compliance
-# with the License.
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
 #
 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
 # or http://www.opensolaris.org/os/licensing.
@@ -21,10 +20,10 @@
 # CDDL HEADER END
 #
 #
-#ident	"%Z%%M%	%I%	%E% SMI"
+# ident	"%Z%%M%	%I%	%E% SMI"
 #
-# Copyright (c) 2000 by Sun Microsystems, Inc.
-# All rights reserved.
+# Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
+# Use is subject to license terms.
 #
 #	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
 #	  All Rights Reserved
@@ -36,11 +35,16 @@
 #
 for fsckdev in $* ; do
 	/usr/sbin/fsck -m -F ufs $fsckdev >/dev/null 2>&1
-	if [ $? != 33 ]; then
-		ufs_fscklist="$ufs_fscklist $fsckdev"
-	else
-		echo "$fsckdev already mounted"
-	fi
+	case $? in
+	33)	echo "$fsckdev already mounted"
+		;;
+
+	0)	echo "$fsckdev is clean"
+		;;
+
+	*)	ufs_fscklist="$ufs_fscklist $fsckdev"
+		;;
+	esac
 done
 
 #