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.

72 lines
2.2 KiB

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