1
0
This repository has been archived on 2024-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
ZyXEL_VMG8623-T50B/vmg8623_t50b_default_release/package/hfsprogs/files/hfs-fsck.sh

31 lines
680 B
Bash
Executable File

#!/bin/sh
#
# Copyright (c) 2013 Mikhail Gusarov
#
# This is free software, licensed under the GNU General Public License v2+.
#
fsck_hfs() {
fsck.hfsplus "$device" 2>&1 | logger -t "fstab: fsck_hfs ($device)"
local status="$?"
case "$status" in
0)
return 0;;
4)
reboot;; # Filesystem is fixed, reboot is required
8)
echo "fsck_hfs ($device): Unable to fix filesystem!" | logger -t fstab
return 1;;
*)
echo "fsck_hfs ($device): Error $status. Check is not complete." \
| logger -t fstab
return 1;;
esac
}
fsck_hfsplus() {
fsck_hfs "$@"
}
append libmount_known_fsck "hfs"
append libmount_known_fsck "hfsplus"