iscsi-initiator revision d30a1dc56ac8d5e7462b900c98440ba40daa3a46
# The contents of this file are subject to the terms of the # Common Development and Distribution License (the "License"). # You may not use this file except in compliance with the License. # See the License for the specific language governing permissions # and limitations under the License. # When distributing Covered Code, include this CDDL HEADER in each # If applicable, add the following below this CDDL HEADER, with the # fields enclosed by brackets "[]" replaced with your own identifying # information: Portions Copyright [yyyy] [name of copyright owner] # Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. # checkmessage "fsck_device | mount_point" # Simple auxilary routine to the shell function checkfs. Prints out # instructions for a manual file system check before entering the shell. echo "WARNING - Unable to repair one or more \c" \ echo "of the following filesystem(s):" > /dev/console echo "WARNING - Unable to repair one or more filesystems." \ echo "Run fsck manually (fsck filesystem...)." > /dev/console # checkfs raw_device fstype mountpoint # Check the file system specified. The return codes from fsck have the # 0 - file system is unmounted and okay # 32 - file system is unmounted and needs checking (fsck -m only) # 33 - file system is already mounted # 34 - cannot stat device # 36 - uncorrectable errors detected - terminate normally (4.1 code 8) # 37 - a signal was caught during processing (4.1 exit 12) # 39 - uncorrectable errors detected - terminate rightaway (4.1 code 8) # 40 - for root, same as 0 (used by rcS to remount root) # Determine fsck options by file system type echo "The "$3" file system ("$1") is being checked." *) # couldn't fix the file system '#'* | '' ) # Ignore comments, empty lines. '-') # Ignore "no-action" lines. echo "iscsi-initiator: FSType of iscsi LUN \c" 1>&2 echo "$special cannot be identified" 1>&2 # Ignore entries already mounted # Can't fsck if no fsckdev is specified # fsck -m simply returns true if the filesystem is 34) # bogus special device *) # uncorrectable errors # Generate iscsi mountp list from /etc/vfstab '#'* | '') continue;; # Ignore comments, '-') continue;; # Ignore "no-action lines. echo "iscsi-initiator: mount iscsi \c" echo "Usage: $0 { start | stop }"