ALT Linux repos
S: | 2.5.0-alt1 |
5.0: | 2.4.4-alt11 |
4.1: | 2.4.4-alt10.M41.1 |
4.0: | 2.4.4-alt10 |
+updates: | 2.4.4-alt10 |
3.0: | 2.4.2-alt6 |
+updates: | 2.4.2-alt6.M30.1 |
Group :: Networking/Other
RPM: ppp
Main Changelog Spec Patches Sources Download Gear Bugs and FR Repocop
Patch: ppp-2.4.4-deb-load_ppp_generic_if_needed.patch
Download
Download
--- ppp/pppd/sys-linux.c.orig 2004-10-02 18:36:40.864795256 +1000
+++ ppp/pppd/sys-linux.c 2004-10-02 18:36:46.356960320 +1000
@@ -97,6 +97,7 @@
#include <ctype.h>
#include <termios.h>
#include <unistd.h>
+#include <wait.h>
/* This is in netdevice.h. However, this compile will fail miserably if
you attempt to include netdevice.h because it has so many references
@@ -2112,6 +2113,47 @@
return 1;
}
if (kernel_version >= KVERSION(2,3,13)) {
+ char modprobePath[PATH_MAX] = "";
+ int status, p, count;
+ pid_t pid;
+
+ fd = open("/proc/sys/kernel/modprobe", O_RDONLY);
+ if (fd >= 0) {
+ int count = read(fd, modprobePath, PATH_MAX - 1);
+ if (count < 1)
+ modprobePath[0] = 0;
+ else if (modprobePath[count - 1] == '\n')
+ modprobePath[count - 1] = 0;
+ close(fd);
+ }
+
+ if (modprobePath[0] == 0)
+ strcpy(modprobePath, "/sbin/modprobe");
+
+ switch (pid = fork()) {
+ case 0: /* child */
+ setenv("PATH", "/sbin", 1);
+ status = execl(modprobePath, "modprobe", "ppp_generic", NULL);
+ case -1: /* couldn't fork */
+ errno = ENOENT;
+ default: /* parent */
+ do
+ p = waitpid(pid, &status, 0);
+ while (p == -1 && count++ < 4);
+
+ sleep (5);
+
+ }
+
+ if ((fd = open("/dev/ppp", O_RDWR)) >= 0) {
+ new_style_driver = 1;
+ driver_version = 2;
+ driver_modification = 4;
+ driver_patch = 0;
+ close(fd);
+ return 1;
+ }
+
if (errno == ENOENT)
no_ppp_msg =
"pppd is unable to open the /dev/ppp device.\n"