From 82f98ecd4291e8d398a135ac5133c6e363c951dd Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Sat, 28 Jan 2012 22:25:25 -0500 Subject: 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 --- init_functions | 14 +++++++------- 1 file 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" -- cgit v1.2.3-24-g4f1b