blob: 852ae6a0ef65d12d5ac1554566fb3d426005a3f8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
#!/bin/bash
build() {
local added=0
if (( ! fs_autodetect_failed )) && [[ $rootfstype ]]; then
add_binary /sbin/fsck.$rootfstype && (( ++added ))
else
for fsck in "$BASEDIR"/sbin/fsck.*; do
[[ -f $fsck ]] || continue
add_binary "${fsck#$BASEDIR}" && (( ++added ))
done
fi
if (( added )); then
add_binary /sbin/fsck
else
warning "No fsck helpers found. fsck will not be run on boot."
fi
}
help() {
cat <<HELPEOF
This hook provides fsck and filesystem specific helpers to perform an fsck
operation on the root device prior to mounting. If the autodetect hook is used,
only the fsck helper specific to your filesystem will be added to the image. It
is highly recommended that if you include this hook that you also include any
necessary modules to ensure your keyboard will work in early userspace.
HELPEOF
}
# vim: set ft=sh ts=4 sw=4 et:
|