aboutsummaryrefslogtreecommitdiffstats
path: root/main/openrc/0001-fsck-add-C0-and-T-options-unless-fsck-is-busybox.patch
diff options
context:
space:
mode:
Diffstat (limited to 'main/openrc/0001-fsck-add-C0-and-T-options-unless-fsck-is-busybox.patch')
-rw-r--r--main/openrc/0001-fsck-add-C0-and-T-options-unless-fsck-is-busybox.patch38
1 files changed, 38 insertions, 0 deletions
diff --git a/main/openrc/0001-fsck-add-C0-and-T-options-unless-fsck-is-busybox.patch b/main/openrc/0001-fsck-add-C0-and-T-options-unless-fsck-is-busybox.patch
new file mode 100644
index 0000000000..86676e5ad7
--- /dev/null
+++ b/main/openrc/0001-fsck-add-C0-and-T-options-unless-fsck-is-busybox.patch
@@ -0,0 +1,38 @@
+From d1cb63729cb64cd3aebb14f00eaa8f03b90a57fe Mon Sep 17 00:00:00 2001
+From: Natanael Copa <ncopa@alpinelinux.org>
+Date: Wed, 9 Mar 2011 18:07:39 +0000
+Subject: [PATCH] fsck: add -C0 and -T options unless fsck is busybox
+
+---
+ init.d/fsck.in | 8 +++++++-
+ 1 files changed, 7 insertions(+), 1 deletions(-)
+
+diff --git a/init.d/fsck.in b/init.d/fsck.in
+index de44ea8..3b55fbd 100644
+--- a/init.d/fsck.in
++++ b/init.d/fsck.in
+@@ -30,6 +30,10 @@ _forcefsck()
+ [ -e /forcefsck ] || get_bootparam forcefsck
+ }
+
++_fsck_is_busybox() {
++ [ -L /sbin/fsck ] && [ "$(readlink -f /sbin/fsck)" = "/bin/busybox" ]
++}
++
+ start()
+ {
+ local fsck_opts= p= check_extra=
+@@ -60,7 +64,9 @@ start()
+ done
+
+ if [ "$RC_UNAME" = Linux ]; then
+- fsck_opts="$fsck_opts -C0 -T"
++ if ! _fsck_is_busybox; then
++ fsck_opts="$fsck_opts -C0 -T"
++ fi
+ if [ -z "$fsck_passno" ]; then
+ fsck_args=${fsck_args--A -p}
+ if echo 2>/dev/null >/.test.$$; then
+--
+1.7.4.1
+