#!/usr/sbin/sh # # Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. # # Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T # All Rights Reserved # # # Produce a list of the file systems that are not already # mounted. # for fsckdev in $* ; do /usr/sbin/fsck -m -F ufs $fsckdev >/dev/null 2>&1 case $? in 33) echo "$fsckdev already mounted" ;; 0) echo "$fsckdev is clean" ;; *) ufs_fscklist="$ufs_fscklist $fsckdev" ;; esac done # # Check the file systems in parallel # if [ "$ufs_fscklist" ]; then echo "checking ufs filesystems" /usr/sbin/fsck -o p $ufs_fscklist case $? in 0|40|33) # file system OK exit 0 ;; *) # couldn't fix the filesystems - return an error exit 1 ;; esac fi exit 0