better message for the case when /dev/ppp doesn't exist
authorPaul Mackerras <paulus@samba.org>
Tue, 13 Mar 2001 05:36:32 +0000 (05:36 +0000)
committerPaul Mackerras <paulus@samba.org>
Tue, 13 Mar 2001 05:36:32 +0000 (05:36 +0000)
pppd/sys-linux.c

index b1c58aa007436629f0c42bc5d7126019487c7dd3..f1b48423ef83c537367820db55cc1ffb96b2a841 100644 (file)
@@ -1928,8 +1928,15 @@ int ppp_available(void)
        close(fd);
        return 1;
     }
-    if (kernel_version >= KVERSION(2,3,13))
+    if (kernel_version >= KVERSION(2,3,13)) {
+       if (errno == ENOENT)
+           no_ppp_msg =
+               "pppd is unable to open the /dev/ppp device.\n"
+               "You need to create the /dev/ppp device node by\n"
+               "executing the following command as root:\n"
+               "       mknod /dev/ppp c 108 0\n";
        return 0;
+    }
 
 /*
  * Open a socket for doing the ioctl operations.