File ash-1.6.1-suse.raid.diff of Package ash

--- builtins.def
+++ builtins.def
@@ -87,3 +87,4 @@
 #newgrp		-u newgrp	# optional command in posix
 
 #exprcmd	expr
+raidautoruncmd	raidautorun
--- miscbltin.c
+++ miscbltin.c
@@ -67,6 +67,14 @@
 #include "miscbltin.h"
 #include "mystring.h"
 
+#include <fcntl.h>
+#include <sys/ioctl.h>
+#include <linux/major.h>
+#include <linux/raid/md_u.h>
+#ifndef RAID_AUTORUN
+# define RAID_AUTORUN _IO (MD_MAJOR, 0x14)
+#endif
+
 #undef rflag
 
 
@@ -406,3 +414,15 @@
 	}
 	return 0;
 }
+
+
+
+raidautoruncmd(argc, argv)  char **argv; {
+	int fd = open("/dev/md0", O_RDWR);
+
+	if (fd >= 0) {
+		ioctl(fd , RAID_AUTORUN, 0);
+		close(fd);
+	}
+}
+