1954e2
diff -up dhcp-4.3.5/omapip/errwarn.c.errwarn dhcp-4.3.5/omapip/errwarn.c
1954e2
--- dhcp-4.3.5/omapip/errwarn.c.errwarn	2016-09-27 21:16:50.000000000 +0200
1954e2
+++ dhcp-4.3.5/omapip/errwarn.c	2016-11-29 19:44:03.515031147 +0100
1954e2
@@ -49,6 +49,41 @@ void (*log_cleanup) (void);
1954e2
 static char mbuf [CVT_BUF_MAX + 1];
1954e2
 static char fbuf [CVT_BUF_MAX + 1];
1954e2
 
1954e2
+// get BUG_REPORT_URL from /etc/os-release
1954e2
+char * bug_report_url(void) {
1954e2
+    FILE * file = fopen("/etc/os-release", "r");
1954e2
+    size_t len;
1954e2
+    char * line = NULL;
1954e2
+    char * url = NULL;
1954e2
+    size_t url_len = 256;
1954e2
+
1954e2
+    url = (char *) malloc(url_len * sizeof(char));
1954e2
+    strcpy(url, "https://bugzilla.redhat.com/");
1954e2
+
1954e2
+    if (!file)
1954e2
+        return url;
1954e2
+
1954e2
+    while ((getline(&line, &len, file)) != -1) {
1954e2
+        if (strstr(line, "BUG_REPORT_URL") != NULL) {
1954e2
+            char * start = strchr(line, '=');
1954e2
+            char * rquotes = strrchr(line, '"');
1954e2
+
1954e2
+            if (rquotes != NULL) {
1954e2
+                *rquotes = '\0';
1954e2
+                strncpy(url, start+2, url_len);
1954e2
+            } else {
1954e2
+                strncpy(url, start+1, url_len);
1954e2
+            }
1954e2
+            url[url_len-1] = '\0';
1954e2
+            fclose(file);
1954e2
+            return url;
1954e2
+        }
1954e2
+    }
1954e2
+    fclose(file);
1954e2
+    return url;
1954e2
+}
1954e2
+
1954e2
+
1954e2
 /* Log an error message, then exit... */
1954e2
 
1954e2
 void log_fatal (const char * fmt, ... )
1954e2
@@ -75,11 +110,13 @@ void log_fatal (const char * fmt, ... )
e7bd38
   }
db449e
 
db449e
   log_error ("%s", "");
e7bd38
-  log_error ("If you think you have received this message due to a bug rather");
e7bd38
-  log_error ("than a configuration issue please read the section on submitting");
e7bd38
-  log_error ("bugs on either our web page at www.isc.org or in the README file");
e7bd38
-  log_error ("before submitting a bug.  These pages explain the proper");
af708b
-  log_error ("process and the information we find helpful for debugging.");
db449e
+  log_error ("This version of ISC DHCP is based on the release available");
1954e2
+  log_error ("on ftp.isc.org. Features have been added and other changes");
db449e
+  log_error ("have been made to the base software release in order to make");
db449e
+  log_error ("it work better with this distribution.");
e7bd38
+  log_error ("%s", "");
1954e2
+  log_error ("Please report issues with this software via: ");
1954e2
+  log_error ("%s", bug_report_url());
db449e
   log_error ("%s", "");
db449e
   log_error ("exiting.");
e7bd38