Print this page
6198 Let's EOL cachefs

*** 20,32 **** */ /* * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ - #pragma ident "%Z%%M% %I% %E% SMI" /* * This program does the following: * * a) Returns: --- 20,32 ---- */ /* * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. + * Copyright 2015 Nexenta Systems, Inc. All rights reserved. */ /* * This program does the following: * * a) Returns:
*** 34,44 **** * !0 - if an error occurred. * * b) If the program is successful, it prints three tokens to * stdout: <root fs type> <interface name> <net config strategy>. * where: ! * <root fs type> - "nfs" or "ufs" * <interface name> - "hme0" or "none" * <net config strategy> - "dhcp", "rarp", "bootprops" * or "none" * * Eg: --- 34,44 ---- * !0 - if an error occurred. * * b) If the program is successful, it prints three tokens to * stdout: <root fs type> <interface name> <net config strategy>. * where: ! * <root fs type> - "nfs", "ufs" or "zfs" * <interface name> - "hme0" or "none" * <net config strategy> - "dhcp", "rarp", "bootprops" * or "none" * * Eg:
*** 306,323 **** /* * We're not "nfs dhcp", "nfs none" is impossible, and we don't handle * "ufs rarp" (consumers are coded to deal with this reality), so * there are three possible situations: * ! * 1. We're "ufs dhcp" if there are any interfaces which have ! * obtained their addresses through DHCP. That is, if there ! * are any IFF_UP and non-IFF_VIRTUAL interfaces also have ! * IFF_DHCPRUNNING set. * ! * 2. We're "ufs none" if our filesystem is local and there ! * are no interfaces which have obtained their addresses ! * through DHCP. * * 3. We're "nfs rarp" if our filesystem is remote and there's * at least IFF_UP non-IFF_VIRTUAL interface (which there * *must* be, since we're running over NFS somehow), then * it must be RARP since SI_DHCP_CACHE call above failed. --- 306,323 ---- /* * We're not "nfs dhcp", "nfs none" is impossible, and we don't handle * "ufs rarp" (consumers are coded to deal with this reality), so * there are three possible situations: * ! * 1. We're either "ufs dhcp" or "zfs dhcp" if there are any ! * interfaces which have obtained their addresses through DHCP. ! * That is, if there are any IFF_UP and non-IFF_VIRTUAL ! * interfaces also have IFF_DHCPRUNNING set. * ! * 2. We're either "ufs none" or "zfs none" if our filesystem ! * is local and there are no interfaces which have obtained ! * their addresses through DHCP. * * 3. We're "nfs rarp" if our filesystem is remote and there's * at least IFF_UP non-IFF_VIRTUAL interface (which there * *must* be, since we're running over NFS somehow), then * it must be RARP since SI_DHCP_CACHE call above failed.
*** 327,337 **** interface = get_first_interface(&dhcp_running); if (dhcp_running) strategy = "dhcp"; ! if (strcmp(root, "nfs") == 0 || strcmp(root, "cachefs") == 0) { if (interface == NULL) { (void) fprintf(stderr, "%s: cannot identify root interface.\n", program); close_sockets(); return (2); --- 327,337 ---- interface = get_first_interface(&dhcp_running); if (dhcp_running) strategy = "dhcp"; ! if (strcmp(root, "nfs") == 0) { if (interface == NULL) { (void) fprintf(stderr, "%s: cannot identify root interface.\n", program); close_sockets(); return (2);