diff options
author | James C Kimble | 2015-07-15 10:09:01 -0500 |
---|---|---|
committer | James C Kimble | 2015-07-15 10:09:01 -0500 |
commit | e4d0355bfa9068809ca76b4e59077292a97cc200 (patch) | |
tree | 8e1d10e394d75ca361e0961791282602d3ec3e59 /autofsck_hook | |
download | aur-e4d0355bfa9068809ca76b4e59077292a97cc200.tar.gz |
Initial import
Diffstat (limited to 'autofsck_hook')
-rw-r--r-- | autofsck_hook | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/autofsck_hook b/autofsck_hook new file mode 100644 index 000000000000..773c08844bc8 --- /dev/null +++ b/autofsck_hook @@ -0,0 +1,20 @@ +#!/usr/bin/ash + +run_hook () { + eval "$(busybox sed 's/fsck_device/orig_fsck_device/' init_functions)" + eval "fsck_device(){ auto_fsck_device \$1;}" +} +auto_fsck_device() { + orig_fsck_device $1; + RET=$?; + if [ -n "$fsckret" ] && [ "$fsckret" -ne 255 ]; then + if bitfield_has_bit "$fsckret" 4; then + fsck -a $1; + if [ "$?" == "0" ];then + return 0; + fi; + fi; + fi; + return $RET; +} + |