diff options
author | Dave Reisner <dreisner@archlinux.org> | 2012-01-29 04:25:25 +0100 |
---|---|---|
committer | Dave Reisner <dreisner@archlinux.org> | 2012-01-29 18:33:41 +0100 |
commit | 82f98ecd4291e8d398a135ac5133c6e363c951dd (patch) | |
tree | 0e18aa2784fce2fc5f2e6ffd0ed6c63ee63e9eb9 /init_functions | |
parent | d08fdeaf1df8e8b5ea379d311e8703c4c630ecb1 (diff) | |
download | mkinitcpio-82f98ecd4291e8d398a135ac5133c6e363c951dd.tar.gz mkinitcpio-82f98ecd4291e8d398a135ac5133c6e363c951dd.tar.xz |
init_functions: avoid using fsck_ret to check 0
our fsck_ret function would always return true when passed 0, which
clearly isn't what we want. Use a simple string compare instead.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Diffstat (limited to 'init_functions')
-rw-r--r-- | init_functions | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/init_functions b/init_functions index 9611c27..4945136 100644 --- a/init_functions +++ b/init_functions @@ -111,17 +111,17 @@ fsck_root() { } if [ "$fsckret" -ne 255 ]; then - if fsck_ret 0 || fsck_ret 1; then + if [ "$fsckret" = '0' ] || fsck_ret 1; then echo "$fsckret" > /run/initramfs/root-fsck elif fsck_ret 4; then err "Bailing out. Run 'fsck $root' manually" printf '%s\n' \ - "********** FILESYSTEM CHECK FAILED **********" - "* *" - "* Please run fsck manually. After leaving *" - "* this maintenance shell, the system will *" - " reboot automatically. *" - "* *" + "********** FILESYSTEM CHECK FAILED **********" \ + "* *" \ + "* Please run fsck manually. After leaving *" \ + "* this maintenance shell, the system will *" \ + " reboot automatically. *" \ + "* *" \ "*********************************************" launch_interactive_shell echo ":: Automatic reboot in progress" |