Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Evergreen:11.2:Test
dhcpcd
dhcpcd-3.2.3-netconfig.diff
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File dhcpcd-3.2.3-netconfig.diff of Package dhcpcd
diff -u dhcpcd-3.2.3-clientid//configure.c dhcpcd-3.2.3-netconfig//configure.c --- dhcpcd-3.2.3-clientid//configure.c 2008-09-03 11:26:50.000000000 +0200 +++ dhcpcd-3.2.3-netconfig//configure.c 2008-09-23 12:05:13.000000000 +0200 @@ -30,6 +30,7 @@ #include <sys/param.h> #include <sys/socket.h> #include <sys/stat.h> +#include <sys/wait.h> #include <arpa/inet.h> @@ -93,6 +94,7 @@ char **argv; int n = 1; int ret = 0; + int status; pid_t pid; sigset_t full; sigset_t old; @@ -136,7 +138,9 @@ logger (LOG_ERR, "error executing \"%s\": %s", cmd, strerror (errno)); _exit (111); - /* NOTREACHED */ + break; + default: + while ( waitpid(pid, NULL , 0) == -1 && errno == EINTR); } #ifdef THERE_IS_NO_FORK @@ -808,6 +812,22 @@ make_nis(iface->name, dhcp, options); #endif +#ifdef ENABLE_INFO + if (! dhcp->frominfo) + write_info (iface, dhcp, options, true); +#endif + + if (iface->previous_address.s_addr != dhcp->address.s_addr || + iface->previous_netmask.s_addr != dhcp->netmask.s_addr) + { + memcpy (&iface->previous_address, + &dhcp->address, sizeof (iface->previous_address)); + memcpy (&iface->previous_netmask, + &dhcp->netmask, sizeof (iface->previous_netmask)); + exec_script (options->script, iface->infofile, "new"); + } else + exec_script (options->script, iface->infofile, "up"); + curhostname = xmalloc (sizeof (char) * MAXHOSTNAMELEN); *curhostname = '\0'; @@ -840,21 +860,5 @@ free (curhostname); -#ifdef ENABLE_INFO - if (! dhcp->frominfo) - write_info (iface, dhcp, options, true); -#endif - - if (iface->previous_address.s_addr != dhcp->address.s_addr || - iface->previous_netmask.s_addr != dhcp->netmask.s_addr) - { - memcpy (&iface->previous_address, - &dhcp->address, sizeof (iface->previous_address)); - memcpy (&iface->previous_netmask, - &dhcp->netmask, sizeof (iface->previous_netmask)); - exec_script (options->script, iface->infofile, "new"); - } else - exec_script (options->script, iface->infofile, "up"); - return (0); } diff -u dhcpcd-3.2.3-clientid//dhcpcd.8.in dhcpcd-3.2.3-netconfig//dhcpcd.8.in --- dhcpcd-3.2.3-clientid//dhcpcd.8.in 2008-09-03 11:19:39.000000000 +0200 +++ dhcpcd-3.2.3-netconfig//dhcpcd.8.in 2008-09-03 11:33:21.000000000 +0200 @@ -311,6 +311,13 @@ or restart the ypbind service. .It Fl D , -nisdomain Forces dhcpcd to set domainname of the host to the domainname option supplied by DHCP server. +.It Fl -netconfig +Forces dhcpcd to use the SuSE netconfig tool. This option turn on following options: +.Fl N , R , Y +and sets +.Fl c +to +.Pa /etc/sysconfig/network/scripts/dhcpcd-hook . .El .Sh NOTES Because diff -u dhcpcd-3.2.3-clientid//dhcpcd.c dhcpcd-3.2.3-netconfig//dhcpcd.c --- dhcpcd-3.2.3-clientid//dhcpcd.c 2008-09-03 11:19:39.000000000 +0200 +++ dhcpcd-3.2.3-netconfig//dhcpcd.c 2008-09-03 11:33:21.000000000 +0200 @@ -83,6 +83,7 @@ {"msscr", no_argument, NULL, 'S'}, {"test", no_argument, NULL, 'T'}, {"nonis", no_argument, NULL, 'Y'}, + {"netconfig", no_argument, NULL, 0x9999}, {"help", no_argument, &dohelp, 1}, {"version", no_argument, &doversion, 1}, #ifdef THERE_IS_NO_FORK @@ -139,7 +140,7 @@ printf ("usage: "PACKAGE" [-adknpEGHKMNRSTYD] [-c script] [-h hostname] [-i classID]\n" " [-l leasetime] [-m metric] [-r ipaddress] [-s ipaddress]\n" " [-t timeout] [-u userclass] [-F none | ptr | both]\n" - " [-I clientID] <interface>\n"); + " [-I clientID] [ --netconfig ] <interface>\n"); } int main(int argc, char **argv) @@ -178,6 +179,7 @@ options->doinform = false; options->doipv4ll = true; options->doduid = true; + options->netconfig = false; options->timeout = DEFAULT_TIMEOUT; gethostname (options->hostname, sizeof (options->hostname)); @@ -410,9 +413,18 @@ case 'Y': options->donis = false; break; - case 'D': - options->donisdom = true; - break; + case 'D': + if(!options->netconfig) + options->donisdom = true; + break; + case 0x9999: + options->dodns = false; + options->donis = false; + options->donisdom = false; + options->dontp = false; + options->netconfig = true; + options->script = "/etc/sysconfig/network/scripts/dhcpcd-hook"; + break; case '?': usage (); diff -u dhcpcd-3.2.3-clientid//dhcpcd.h dhcpcd-3.2.3-netconfig//dhcpcd.h --- dhcpcd-3.2.3-clientid//dhcpcd.h 2008-09-03 11:19:39.000000000 +0200 +++ dhcpcd-3.2.3-netconfig//dhcpcd.h 2008-09-03 11:33:21.000000000 +0200 @@ -77,6 +77,7 @@ bool dorequest; bool doipv4ll; bool doduid; + bool netconfig; int domscsr; struct in_addr request_address;
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor