dmake: do not set MAKEFLAGS=k
[unleashed/tickless.git] / usr / src / cmd / fs.d / ufs / fsckall / fsckall.sh
blobe5d422d9b858e7feeade2dac1ae092e290f94f37
1 #!/sbin/sh
3 # CDDL HEADER START
5 # The contents of this file are subject to the terms of the
6 # Common Development and Distribution License (the "License").
7 # You may not use this file except in compliance with the License.
9 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 # or http://www.opensolaris.org/os/licensing.
11 # See the License for the specific language governing permissions
12 # and limitations under the License.
14 # When distributing Covered Code, include this CDDL HEADER in each
15 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 # If applicable, add the following below this CDDL HEADER, with the
17 # fields enclosed by brackets "[]" replaced with your own identifying
18 # information: Portions Copyright [yyyy] [name of copyright owner]
20 # CDDL HEADER END
23 # ident "%Z%%M% %I% %E% SMI"
25 # Copyright 2007 Sun Microsystems, Inc. All rights reserved.
26 # Use is subject to license terms.
28 # Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
29 # All Rights Reserved
33 # Produce a list of the file systems that are not already
34 # mounted.
36 for fsckdev in $* ; do
37 /usr/sbin/fsck -m -F ufs $fsckdev >/dev/null 2>&1
38 case $? in
39 33) echo "$fsckdev already mounted"
42 0) echo "$fsckdev is clean"
45 *) ufs_fscklist="$ufs_fscklist $fsckdev"
47 esac
48 done
51 # Check the file systems in parallel
54 if [ "$ufs_fscklist" ]; then
55 echo "checking ufs filesystems"
56 /usr/sbin/fsck -o p $ufs_fscklist
57 case $? in
58 0|40|33) # file system OK
59 exit 0
62 *) # couldn't fix the filesystems - return an error
63 exit 1
65 esac
68 exit 0