- loaded = 1;
- return;
- }
- f = fopen(conffile, "r");
- /* Debian chose to relocate mdadm.conf into /etc/mdadm/.
- * To allow Debian users to compile from clean source and still
- * have a working mdadm, we read /etc/mdadm/mdadm.conf
- * if /etc/mdadm.conf doesn't exist
- */
- if (f == NULL &&
- conffile == DefaultConfFile) {
- f = fopen(DefaultAltConfFile, "r");
- if (f) {
- conffile = DefaultAltConfFile;
- confdir = DefaultAltConfDir;
+ } else if (strcmp(conffile, "none") != 0) {
+ f = fopen(conffile, "r");
+ /* Debian chose to relocate mdadm.conf into /etc/mdadm/.
+ * To allow Debian users to compile from clean source and still
+ * have a working mdadm, we read /etc/mdadm/mdadm.conf
+ * if /etc/mdadm.conf doesn't exist
+ */
+ if (f == NULL &&
+ conffile == DefaultConfFile) {
+ f = fopen(DefaultAltConfFile, "r");
+ if (f) {
+ conffile = DefaultAltConfFile;
+ confdir = DefaultAltConfDir;
+ }