# --- ROCK-COPYRIGHT-NOTE-BEGIN --- # # This copyright note is auto-generated by ./scripts/Create-CopyPatch. # Please add additional copyright information _after_ the line containing # the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by # the ./scripts/Create-CopyPatch script. Do not edit this copyright text! # # ROCK Linux: rock-src/package/stf/dhcpcd/nodetach_option.patch # ROCK Linux is Copyright (C) 1998 - 2006 Clifford Wolf # # This patch file is dual-licensed. It is available under the license the # patched project is licensed under, as long as it is an OpenSource license # as defined at https://www.opensource.org/ (e.g. BSD, X11) or under the terms # of the GNU General Public License as published by the Free Software # Foundation; either version 2 of the License, or (at your option) any later # version. # # --- ROCK-COPYRIGHT-NOTE-END --- --- ./dhcpcd.c.orig 2004-11-05 18:06:47.000000000 -0300 +++ ./dhcpcd.c 2004-11-05 18:17:19.000000000 -0300 @@ -59,6 +59,7 @@ int ReplNTPConf = 1; int SetDomainName = 0; int SetHostName = 0; +int NoDetach = 0; int BroadcastResp = 0; time_t TimeOut = DEFAULT_TIMEOUT; int magic_cookie = 0; @@ -145,6 +146,10 @@ s++; DebugFlag=1; goto prgs; + case 'a': + s++; + NoDetach=1; + goto prgs; case 'r': s++; BeRFC1541=1; @@ -325,7 +330,7 @@ default: usage: print_version(); fprintf(stderr, -"Usage: dhcpcd [-dknrBCDHNRSTY] [-l leasetime] [-h hostname] [-t timeout]\n\ +"Usage: dhcpcd [-adknrBCDHNRSTY] [-l leasetime] [-h hostname] [-t timeout]\n\ [-i vendorClassID] [-I ClientID] [-c filename] [-s [ipaddr]]\n\ [-w windowsize] [-L ConfigDir] [-G [gateway]] [interface]\n"); exit(1); @@ -375,9 +380,12 @@ if ( TestCase ) exit(0); #endif alarm(0); -#ifdef DEBUG +#ifndef DEBUG + if ( NoDetach ) { +#endif writePidFile(getpid()); -#else +#ifndef DEBUG + } else { #ifdef EMBED s=vfork(); #else @@ -396,6 +404,7 @@ (void)dup2(i,STDERR_FILENO); if ( i > 2 ) (void)close(i); } + } #endif chdir("/"); do currState=(void *(*)())currState(); while ( currState );