]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
Switch from /lib/init/rw to /dev for early-boot files.
authorNeilBrown <neilb@suse.de>
Wed, 28 Jul 2010 07:04:42 +0000 (17:04 +1000)
committerNeilBrown <neilb@suse.de>
Wed, 28 Jul 2010 07:41:35 +0000 (17:41 +1000)
It turns out that /lib/init/rw doesn't exist in early boot
like I thought.  So give up on that idea and just use
/dev/.mdadm/ for files that must persist from early-boot
to regular boot.

Signed-off-by: NeilBrown <neilb@suse.de>
Makefile
mdadm.h
mdmon.8

index 5dd0e4048baa6b2b4e3397ec3877f733e5a2a68f..818e2d1b73f1271631db70bc2b6b4d30b31399fe 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -66,11 +66,11 @@ MAILCMD =/usr/sbin/sendmail -t
 CONFFILEFLAGS = -DCONFFILE=\"$(CONFFILE)\" -DCONFFILE2=\"$(CONFFILE2)\"
 # Both MAP_DIR and MDMON_DIR should be somewhere that persists across the
 # pivotroot from early boot to late boot.
-# If you don't have /lib/init/rw you might want to use /dev/.something
-#  e.g. make MAP_DIR=/dev/.mdadm
-MAP_DIR = /lib/init/rw/mdadm
+# /dev is an odd place to put this, but it is the only directory that
+# meets the requirements.
+MAP_DIR=/dev/.mdadm
 MAP_FILE = map
-MDMON_DIR = /lib/init/rw/mdmon
+MDMON_DIR = /dev/.mdadm
 DIRFLAGS = -DMAP_DIR=\"$(MAP_DIR)\" -DMAP_FILE=\"$(MAP_FILE)\"
 DIRFLAGS += -DMDMON_DIR=\"$(MDMON_DIR)\"
 CFLAGS = $(CWFLAGS) $(CXFLAGS) -DSendmail=\""$(MAILCMD)"\" $(CONFFILEFLAGS) $(DIRFLAGS)
diff --git a/mdadm.h b/mdadm.h
index b95c9c9a078955e28e17c73c39220b60db660b43..54df02a1115c56fc79c212ab79cbb9398fb85826 100644 (file)
--- a/mdadm.h
+++ b/mdadm.h
@@ -70,10 +70,10 @@ extern __off64_t lseek64 __P ((int __fd, __off64_t __offset, int __whence));
 
 /* MAP_DIR should be somewhere that persists across the pivotroot
  * from early boot to late boot.
- * If you don't have /lib/init/rw you might want to use /dev/.something
+ * Currently /dev seems to be the only option on most distros.
  */
 #ifndef MAP_DIR
-#define MAP_DIR "/lib/init/rw/mdadm"
+#define MAP_DIR "/dev/.mdadm"
 #endif /* MAP_DIR */
 /* MAP_FILE is what we name the map file we put in MAP_DIR, in case you
  * want something other than the default of "map"
@@ -90,7 +90,7 @@ extern __off64_t lseek64 __P ((int __fd, __off64_t __offset, int __whence));
  * boot process and stays up as long as possible during shutdown.
  */
 #ifndef MDMON_DIR
-#define MDMON_DIR "/lib/init/rw/mdmon"
+#define MDMON_DIR "/dev/.mdadm/"
 #endif /* MDMON_DIR */
 
 #include       "md_u.h"
diff --git a/mdmon.8 b/mdmon.8
index 53dd5d2c2e69b455a30229679aa4aff9392d826a..0c24732f85c2b234c50bd3743dc459c6660bc749 100644 (file)
--- a/mdmon.8
+++ b/mdmon.8
@@ -208,7 +208,7 @@ and
 .B .sock
 file on.  The particular filesystem to use is given to mdmon at compile
 time and defaults to
-.BR /lib/init/rw .
+.BR /dev/.mdadm .
 
 This filesystem must persist through to the end of the boot sequence.