mapfile: if we putting the mapfile in a custom location via ALT_RUN, allow

a custom filename too.

Signed-off-by: Doug Ledford <dledford@redhat.com>
This commit is contained in:
Doug Ledford 2010-03-17 10:52:22 -04:00 committed by NeilBrown
parent 435b90e7d4
commit e259df4e63
3 changed files with 6 additions and 2 deletions

View File

@ -63,8 +63,9 @@ CONFFILEFLAGS = -DCONFFILE=\"$(CONFFILE)\" -DCONFFILE2=\"$(CONFFILE2)\"
# If you don't have /lib/init/rw you might want to use /dev/.something
# e.g. make ALT_RUN=/dev/.mdadm
ALT_RUN = /lib/init/rw
ALT_MAPFILE = map
VAR_RUN = /var/run
ALTFLAGS = -DALT_RUN=\"$(ALT_RUN)\"
ALTFLAGS = -DALT_RUN=\"$(ALT_RUN)\" -DALT_MAPFILE=\"$(ALT_MAPFILE)\"
VARFLAGS = -DVAR_RUN=\"$(VAR_RUN)\"
CFLAGS = $(CWFLAGS) $(CXFLAGS) -DSendmail=\""$(MAILCMD)"\" $(CONFFILEFLAGS) $(ALTFLAGS) $(VARFLAGS)

View File

@ -55,7 +55,7 @@
char *mapname[3][3] = {
mapnames(VAR_RUN "/map"),
mapnames("/var/run/mdadm.map"),
mapnames(ALT_RUN "/map")
mapnames(ALT_RUN "/" ALT_MAPFILE)
};
char *mapdir[3] = { VAR_RUN, NULL, ALT_RUN };

View File

@ -87,6 +87,9 @@ extern __off64_t lseek64 __P ((int __fd, __off64_t __offset, int __whence));
#ifndef ALT_RUN
#define ALT_RUN "/lib/init/rw/mdadm"
#endif /* ALT_RUN */
#ifndef ALT_MAPFILE
#define ALT_MAPFILE "map"
#endif /* ALT_MAPFILE */
#include "md_u.h"
#include "md_p.h"