lede-packages-rs

git clone git://archive.git.mtrnord.blog/MTRNord/lede-packages-rs.git
Log | Files | Refs | README | LICENSE

hfsfsck.sh (646B)


      1 #!/bin/sh
      2 # Copyright 2015 OpenWrt.org
      3 # This is free software, licensed under the GNU General Public License v2.
      4 # See /LICENSE for more information.
      5 #
      6 
      7 fsck_hfsfsck() {
      8 	hfsfsck "$device" 2>&1 | logger -t "fstab: hfsfsck ($device)"
      9 	local status="$?"
     10 	case "$status" in
     11 		0) ;; #success
     12 		4) reboot;;
     13 		8) echo "hfsfsck ($device): Warning! Uncorrected errors."| logger -t fstab
     14 			return 1
     15 			;;
     16 		*) echo "hfsfsck ($device): Error $status. Check not complete."| logger -t fstab;;
     17 	esac
     18 	return 0
     19 }
     20 
     21 fsck_hfs() {
     22 	fsck_hfsfsck "$@"
     23 }
     24 
     25 fsck_hfsplus() {
     26 	fsck_hfsfsck "$@"
     27 }
     28 
     29 append libmount_known_fsck "hfs"
     30 append libmount_known_fsck "hfsplus"