commit: 834b72e8151ee6e17a8de8fc37c07bd70990144c
Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Tue Aug 6 18:01:13 2019 +0000
Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Wed Aug 7 15:03:44 2019 +0000
URL: https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=834b72e8
busybox: Use raidautorun instead of mdstart
raidautorun applet is upstream's replacement for mdstart.
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>
defaults/busy-config | 2 -
defaults/initrd.scripts | 2 +-
.../busybox/1.31.0/busybox-1.26.0-mdstart.patch | 80 ----------------------
3 files changed, 1 insertion(+), 83 deletions(-)
diff --git a/defaults/busy-config b/defaults/busy-config
index 39c3010..0a2456a 100644
--- a/defaults/busy-config
+++ b/defaults/busy-config
@@ -1,5 +1,3 @@
-# Gentoo patch:
-CONFIG_MDSTART=y
# Options to match older versions of busybox:
CONFIG_ASH_BUILTIN_ECHO=y
CONFIG_ASH_BUILTIN_PRINTF=y
diff --git a/defaults/initrd.scripts b/defaults/initrd.scripts
index f95f434..68adfb9 100644
--- a/defaults/initrd.scripts
+++ b/defaults/initrd.scripts
@@ -2332,7 +2332,7 @@ setup_md_device() {
run mknod /dev/md${MD_NUMBER} b 9 ${MD_NUMBER}
>/dev/null 2>&1
[ $? -ne 0 ] && bad_msg "Creation of
/dev/md${MD_NUMBER} failed ..."
fi
- run mdstart ${MDPART} /dev/md${MD_NUMBER}
+ run raidautorun /dev/md${MD_NUMBER}
fi
}
diff --git a/patches/busybox/1.31.0/busybox-1.26.0-mdstart.patch
b/patches/busybox/1.31.0/busybox-1.26.0-mdstart.patch
deleted file mode 100644
index 35057b6..0000000
--- a/patches/busybox/1.31.0/busybox-1.26.0-mdstart.patch
+++ /dev/null
@@ -1,80 +0,0 @@
-diff --git a/util-linux/mdStart.c b/util-linux/mdStart.c
---- util-linux/mdStart.c 1969-12-31 18:00:00.000000000 -0600
-+++ util-linux/mdStart.c 2017-01-01 18:25:14.582737879 -0600
-@@ -0,0 +1,76 @@
-+/*
-+ * Linux 2.6(+) RAID Autostarter
-+ *
-+ * Copyright (C) 2005 by Tim Yamin <[email protected]> <[email protected]>
-+ * Copyright (C) 2012 by Sebastian Pipping <[email protected]>
-+ *
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License as published by
-+ * the Free Software Foundation; either version 2 of the License, or
-+ * (at your option) any later version.
-+ *
-+ * This program is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ * General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-+ *
-+ */
-+//config:config MDSTART
-+//config: bool "mdstart"
-+//config: default n
-+//config: help
-+//config: Allows you to autostart /dev/md devices if using an initramfs
to
-+//config: boot.
-+
-+//applet:IF_MDSTART(APPLET(mdstart, BB_DIR_SBIN, BB_SUID_DROP))
-+
-+//kbuild:lib-$(CONFIG_MDSTART) += mdStart.o
-+
-+//usage:#define mdstart_trivial_usage
-+//usage: "[PARTITION] MD-NODE [[PARTITION] MD-NODE ...]"
-+//usage:
-+//usage:#define mdstart_full_usage "\n\n"
-+//usage: "Run the RAID_AUTORUN ioctl on the given MD number"
-+
-+#include <sys/types.h>
-+#include <sys/stat.h>
-+#include <fcntl.h>
-+#include <sys/ioctl.h>
-+#include <linux/major.h>
-+#include <linux/raid/md_u.h>
-+
-+extern int
-+mdstart_main(int argc, char *argv[])
-+{
-+ int i, fd, part = 0, retval = 0;
-+
-+ if(argc < 2)
-+ {
-+ bb_show_usage();
-+ }
-+
-+ for(i = 1; i < argc; i++)
-+ {
-+ if(sscanf(argv[i], "%d", &part) == 1)
-+ continue;
-+
-+ fd = open(argv[i], 0, 0);
-+ if (fd >= 0)
-+ {
-+ ioctl(fd, RAID_AUTORUN, part);
-+ close(fd);
-+ } else
-+ {
-+ printf("Error: Failed to open %s!\n", argv[i]);
-+ retval=1;
-+ }
-+
-+ part = 0;
-+ }
-+
-+ return retval;
-+}