From 00eefc36ae7c8f5f893b2c184fd8f32a3629031b Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Sun, 6 Nov 2011 12:32:22 -0500 Subject: install/fsck: new install hook to add fsck and helpers Provides /sbin/fsck and any helper binaries to the image. If processed after the autodetect hook, only the helper for the root FS is added. Signed-off-by: Dave Reisner --- install/fsck | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 install/fsck (limited to 'install/fsck') diff --git a/install/fsck b/install/fsck new file mode 100644 index 0000000..852ae6a --- /dev/null +++ b/install/fsck @@ -0,0 +1,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 <