[Drbd-dev] Re: [DRBD-user] DRBD 8.2.5 to 8.3.0 upgrade with make PREFIX=/usr/local/drbd error: symlink(/usr/local/drbd/etc/drbd.conf, /var/lib/drbd//drbd-minor-1.conf): No such file or directory

GAUTIER Hervé herve.gautier at thalesgroup.com
Fri Jan 30 17:30:14 CET 2009


Oups, new patch to be sure of the build (rm -f drbdadm_minor_table.o 
added) !

Sorry !

--8<----------------------------------------------
diff -Naur drbd-8.3.0/user/drbdadm_minor_table.c 
drbd-8.3.0-debug/user/drbdadm_minor_table.c
--- drbd-8.3.0/user/drbdadm_minor_table.c       2009-01-30 
16:19:08.000000000 +0100
+++ drbd-8.3.0-debug/user/drbdadm_minor_table.c 2009-01-30 
16:43:32.000000000 +0100
@@ -40,7 +40,9 @@
 #include <sys/stat.h>
 #include <string.h>
 
-#define MINOR_TABLE_DIR "/var/lib/drbd/"
+#include "drbd_prefix.h"
+
+#define MINOR_TABLE_DIR "/var/lib/drbd"
 #define MAX_MINOR 256
 
 #define MAX_REGISTER_PATH_LEN  1024
@@ -49,7 +51,7 @@
  * it is assumed that sprintf cannot fail :-] */
 void linkname_from_minor(char *buf, int minor)
 {
-       sprintf(buf, "%s/drbd-minor-%d.conf", MINOR_TABLE_DIR, minor);
+       sprintf(buf, "%s%s/drbd-minor-%d.conf", DRBD_PREFIX, 
MINOR_TABLE_DIR, minor);
 }
 
 int unregister_minor(int minor)
diff -Naur drbd-8.3.0/user/Makefile drbd-8.3.0-debug/user/Makefile
--- drbd-8.3.0/user/Makefile    2008-12-01 14:35:42.000000000 +0100
+++ drbd-8.3.0-debug/user/Makefile      2009-01-30 17:26:05.000000000 +0100
@@ -43,7 +43,12 @@
 drbd_strings.c: ../drbd/drbd_strings.c
        cp $^ $@
 
-drbdadm: $(drbdadm-obj)
+.PHONY: drbd_prefix.h
+drbd_prefix.h:
+       rm -f drbdadm_minor_table.o
+       echo "#define DRBD_PREFIX       \"$(PREFIX)\"" > drbd_prefix.h
+
+drbdadm: drbd_prefix.h $(drbdadm-obj)
        $(CC) -o $@ $^
 
 # for debugging:
@@ -66,6 +71,7 @@
        $(CC) -o $@ $^
 
 clean:
+       rm -f drbd_prefix.h
        rm -f drbdadm_scanner.c drbdmeta_scanner.c
        rm -f drbdsetup drbdadm drbdmeta drbdmeta_unfinished_rewrite *.o
        rm -f drbd_buildtag.c drbd_strings.c
--8<----------------------------------------------

-- 
Hervé GAUTIER



More information about the drbd-dev mailing list