OpenSDE Packages Database (without history before r20070)
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.

68 lines
2.0 KiB

  1. # --- T2-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # T2 SDE: package/.../dhcpcd/nodetach_option.patch
  5. # Copyright (C) 2004 - 2006 The T2 SDE Project
  6. #
  7. # More information can be found in the files COPYING and README.
  8. #
  9. # This patch file is dual-licensed. It is available under the license the
  10. # patched project is licensed under, as long as it is an OpenSource license
  11. # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
  12. # of the GNU General Public License as published by the Free Software
  13. # Foundation; either version 2 of the License, or (at your option) any later
  14. # version.
  15. # --- T2-COPYRIGHT-NOTE-END ---
  16. --- ./dhcpcd.c.orig 2004-11-05 18:06:47.000000000 -0300
  17. +++ ./dhcpcd.c 2004-11-05 18:17:19.000000000 -0300
  18. @@ -59,6 +59,7 @@
  19. int ReplNTPConf = 1;
  20. int SetDomainName = 0;
  21. int SetHostName = 0;
  22. +int NoDetach = 0;
  23. int BroadcastResp = 0;
  24. time_t TimeOut = DEFAULT_TIMEOUT;
  25. int magic_cookie = 0;
  26. @@ -145,6 +146,10 @@
  27. s++;
  28. DebugFlag=1;
  29. goto prgs;
  30. + case 'a':
  31. + s++;
  32. + NoDetach=1;
  33. + goto prgs;
  34. case 'r':
  35. s++;
  36. BeRFC1541=1;
  37. @@ -325,7 +330,7 @@
  38. default:
  39. usage: print_version();
  40. fprintf(stderr,
  41. -"Usage: dhcpcd [-dknrBCDHNRSTY] [-l leasetime] [-h hostname] [-t timeout]\n\
  42. +"Usage: dhcpcd [-adknrBCDHNRSTY] [-l leasetime] [-h hostname] [-t timeout]\n\
  43. [-i vendorClassID] [-I ClientID] [-c filename] [-s [ipaddr]]\n\
  44. [-w windowsize] [-L ConfigDir] [-G [gateway]] [interface]\n");
  45. exit(1);
  46. @@ -375,9 +380,12 @@
  47. if ( TestCase ) exit(0);
  48. #endif
  49. alarm(0);
  50. -#ifdef DEBUG
  51. +#ifndef DEBUG
  52. + if ( NoDetach ) {
  53. +#endif
  54. writePidFile(getpid());
  55. -#else
  56. +#ifndef DEBUG
  57. + } else {
  58. #ifdef EMBED
  59. s=vfork();
  60. #else
  61. @@ -396,6 +404,7 @@
  62. (void)dup2(i,STDERR_FILENO);
  63. if ( i > 2 ) (void)close(i);
  64. }
  65. + }
  66. #endif
  67. chdir("/");
  68. do currState=(void *(*)())currState(); while ( currState );