aboutsummaryrefslogtreecommitdiffstats
path: root/main/openrc/0001-fsck-add-C0-and-T-options-unless-fsck-is-busybox.patch
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2011-03-09 18:12:51 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2011-03-09 18:12:51 +0000
commit8180e36ca78b08eb9d8dcca07bf495a616afca9f (patch)
treee7938f05673aef9f4558797be45cdddf1d9dbab5 /main/openrc/0001-fsck-add-C0-and-T-options-unless-fsck-is-busybox.patch
parentd930406fdfbcb2887d4bdad9758dddc9f9838b7e (diff)
downloadaports-8180e36ca78b08eb9d8dcca07bf495a616afca9f.tar.bz2
aports-8180e36ca78b08eb9d8dcca07bf495a616afca9f.tar.xz
main/openrc: add e2fsck specific options to fsck unless busybox
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
+