mirror of the now-defunct rocklinux.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

53 lines
1.3 KiB

  1. --- ./dhcpcd.c.orig 2004-11-05 18:06:47.000000000 -0300
  2. +++ ./dhcpcd.c 2004-11-05 18:17:19.000000000 -0300
  3. @@ -59,6 +59,7 @@
  4. int ReplNTPConf = 1;
  5. int SetDomainName = 0;
  6. int SetHostName = 0;
  7. +int NoDetach = 0;
  8. int BroadcastResp = 0;
  9. time_t TimeOut = DEFAULT_TIMEOUT;
  10. int magic_cookie = 0;
  11. @@ -145,6 +146,10 @@
  12. s++;
  13. DebugFlag=1;
  14. goto prgs;
  15. + case 'a':
  16. + s++;
  17. + NoDetach=1;
  18. + goto prgs;
  19. case 'r':
  20. s++;
  21. BeRFC1541=1;
  22. @@ -325,7 +330,7 @@
  23. default:
  24. usage: print_version();
  25. fprintf(stderr,
  26. -"Usage: dhcpcd [-dknrBCDHNRSTY] [-l leasetime] [-h hostname] [-t timeout]\n\
  27. +"Usage: dhcpcd [-adknrBCDHNRSTY] [-l leasetime] [-h hostname] [-t timeout]\n\
  28. [-i vendorClassID] [-I ClientID] [-c filename] [-s [ipaddr]]\n\
  29. [-w windowsize] [-L ConfigDir] [-G [gateway]] [interface]\n");
  30. exit(1);
  31. @@ -375,9 +380,12 @@
  32. if ( TestCase ) exit(0);
  33. #endif
  34. alarm(0);
  35. -#ifdef DEBUG
  36. +#ifndef DEBUG
  37. + if ( NoDetach ) {
  38. +#endif
  39. writePidFile(getpid());
  40. -#else
  41. +#ifndef DEBUG
  42. + } else {
  43. #ifdef EMBED
  44. s=vfork();
  45. #else
  46. @@ -396,6 +404,7 @@
  47. (void)dup2(i,STDERR_FILENO);
  48. if ( i > 2 ) (void)close(i);
  49. }
  50. + }
  51. #endif
  52. chdir("/");
  53. do currState=(void *(*)())currState(); while ( currState );