1 #
   2 # CDDL HEADER START
   3 #
   4 # The contents of this file are subject to the terms of the
   5 # Common Development and Distribution License (the "License").
   6 # You may not use this file except in compliance with the License.
   7 #
   8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9 # or http://www.opensolaris.org/os/licensing.
  10 # See the License for the specific language governing permissions
  11 # and limitations under the License.
  12 #
  13 # When distributing Covered Code, include this CDDL HEADER in each
  14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15 # If applicable, add the following below this CDDL HEADER, with the
  16 # fields enclosed by brackets "[]" replaced with your own identifying
  17 # information: Portions Copyright [yyyy] [name of copyright owner]
  18 #
  19 # CDDL HEADER END
  20 #
  21 # Copyright (c) 1990, 2010, Oracle and/or its affiliates. All rights reserved.
  22 #
  23 #      Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T
  24 #      All Rights Reserved
  25 #
  26 # Portions of this source code were derived from Berkeley 
  27 # under license from the Regents of the University of  
  28 # California.
  29 #
  30 #----
  31 # It is somewhat confusing to note that Solaris 2.x uses /etc/auto_master
  32 # instead of the 4.x /etc/auto.master file name because of NIS+ treating a
  33 # "." in a special way.
  34 #
  35 # Set the following variable to "-b" to have NIS servers use the domain name
  36 # resolver for hosts not in the current domain. 
  37 #B=-b
  38 B=
  39 DIR =/etc
  40 #
  41 # If the ipnodes (IPv6 hosts file) lives in a directory other than
  42 # /etc/inet, then you'll need to change the following line.
  43 #
  44 INETDIR=/etc/inet
  45 #
  46 # If the auth_attr, exec_attr, prof_attr files
  47 # live in a directory other than /etc/security, then you'll
  48 # need to change the following line.
  49 #
  50 RBACDIR=/etc/security
  51 #
  52 # If the passwd, shadow and/or adjunct files used by rpc.yppasswdd
  53 # live in directory other than /etc then you'll need to change the
  54 # following line.
  55 # DO NOT indent the line, however, since /etc/init.d/yp attempts
  56 # to find it with grep "^PWDIR" ...
  57 #
  58 PWDIR =/etc
  59 DOM = `domainname`
  60 NOPUSH = ""
  61 ALIASES = /etc/mail/aliases
  62 YPDIR=/usr/lib/netsvc/yp
  63 SBINDIR=/usr/sbin
  64 YPDBDIR=/var/yp
  65 YPPUSH=$(YPDIR)/yppush
  66 MAKEDBM=$(SBINDIR)/makedbm
  67 MULTI=$(YPDIR)/multi
  68 REVNETGROUP=$(SBINDIR)/revnetgroup
  69 STDETHERS=$(YPDIR)/stdethers
  70 STDHOSTS=$(YPDIR)/stdhosts
  71 MKNETID=$(SBINDIR)/mknetid
  72 MKALIAS=$(YPDIR)/mkalias
  73 
  74 CHKPIPE=  || (  echo "NIS make terminated:" $@ 1>&2; kill -TERM 0 )
  75 
  76 
  77 k:
  78         @if [ ! $(NOPUSH) ]; then $(MAKE)  $(MFLAGS) -k all; \
  79         else $(MAKE) $(MFLAGS) -k all NOPUSH=$(NOPUSH);fi
  80 
  81 all: passwd group hosts ipnodes ethers networks rpc services protocols \
  82         netgroup bootparams aliases publickey netid netmasks c2secure \
  83         timezone auto.master auto.home ageing \
  84         auth.attr exec.attr prof.attr user.attr
  85 
  86 c2secure:
  87         -@if [ -f $(PWDIR)/security/passwd.adjunct ]; then \
  88                 if [ ! $(NOPUSH) ]; then $(MAKE)  $(MFLAGS) -k \
  89                 passwd.adjunct.time group.adjunct.time; \
  90                 else $(MAKE) $(MFLAGS) -k NOPUSH=$(NOPUSH) \
  91                 passwd.adjunct.time group.adjunct.time; \
  92                 fi; \
  93         fi
  94 
  95 passwd.time: $(PWDIR)/passwd $(PWDIR)/shadow
  96         -@if [ -f $(PWDIR)/security/passwd.adjunct ]; then \
  97                 (/usr/xpg4/bin/awk 'BEGIN { FS=":"; OFS=":" } /^[a-zA-Z0-9_]/ { $$2 = "##" $$1; printf "%s\t%s\n", $$1, $$0 }' $(PWDIR)/passwd $(CHKPIPE)) | $(MAKEDBM) - $(YPDBDIR)/$(DOM)/passwd.byname; \
  98                 (/usr/xpg4/bin/awk 'BEGIN { FS=":"; OFS=":"  } /^[a-zA-Z0-9_]/ { $$2 = "##" $$1; printf "%-10d\t%s\n", $$3, $$0 }' $(PWDIR)/passwd $(CHKPIPE)) | $(MAKEDBM) - $(YPDBDIR)/$(DOM)/passwd.byuid; \
  99         elif [ -f $(PWDIR)/shadow ]; then \
 100                 (/usr/xpg4/bin/awk 'BEGIN { FS=":"; OFS=":"; while ( getline < "$(PWDIR)/shadow" > 0) shadow[$$1] = $$2; } /^[a-zA-Z0-9_]/ { $$2 = shadow[$$1]; printf "%s\t%s\n",$$1,$$0 }' $(PWDIR)/passwd $(CHKPIPE))| $(MAKEDBM) - $(YPDBDIR)/$(DOM)/passwd.byname; \
 101                 (/usr/xpg4/bin/awk 'BEGIN { FS=":"; OFS=":"; while ( getline < "$(PWDIR)/shadow" > 0) shadow[$$1] = $$2; } /^[a-zA-Z0-9_]/ { $$2 = shadow[$$1]; printf "%-10d\t%s\n",$$3,$$0 }' $(PWDIR)/passwd $(CHKPIPE))| $(MAKEDBM) - $(YPDBDIR)/$(DOM)/passwd.byuid; \
 102         else \
 103                 (awk 'BEGIN { FS=":"; OFS="\t"; } /^[a-zA-Z0-9_]/ { print $$1, $$0 }' $(PWDIR)/passwd  $(CHKPIPE))| $(MAKEDBM) - $(YPDBDIR)/$(DOM)/passwd.byname; \
 104                 (awk 'BEGIN { FS=":"; OFS="\t"; } /^[a-zA-Z0-9_]/ { printf("%-10d ", $$3); print $$0 }' $(PWDIR)/passwd $(CHKPIPE))| $(MAKEDBM) - $(YPDBDIR)/$(DOM)/passwd.byuid; \
 105         fi
 106         @touch passwd.time; 
 107         @echo "updated passwd"; 
 108         @if [ ! $(NOPUSH) ]; then $(YPPUSH) -d $(DOM) passwd.byname; fi
 109         @if [ ! $(NOPUSH) ]; then $(YPPUSH) -d $(DOM) passwd.byuid; fi
 110         @if [ ! $(NOPUSH) ]; then echo "pushed passwd"; fi
 111 
 112 group.time: $(DIR)/group
 113         @(awk 'BEGIN { FS=":"; OFS="\t"; } /^[a-zA-Z0-9_]/ { print $$1, $$0 }' $(DIR)/group $(CHKPIPE))| $(MAKEDBM) - $(YPDBDIR)/$(DOM)/group.byname; 
 114         @(awk 'BEGIN { FS=":"; OFS="\t"; } /^[a-zA-Z0-9_]/ { printf("%-10d ", $$3); print $$0 }' $(DIR)/group $(CHKPIPE)) | $(MAKEDBM) - $(YPDBDIR)/$(DOM)/group.bygid; 
 115         @touch group.time; 
 116         @echo "updated group"; 
 117         @if [ ! $(NOPUSH) ]; then $(YPPUSH) -d $(DOM) group.byname; fi
 118         @if [ ! $(NOPUSH) ]; then $(YPPUSH) -d $(DOM) group.bygid; fi
 119         @if [ ! $(NOPUSH) ]; then echo "pushed group"; fi
 120 
 121 project.time: $(DIR)/project
 122         @(awk 'BEGIN { FS=":"; OFS="\t"; } /^[a-zA-Z0-9_]/ { print $$1, $$0 }' $(DIR)/project $(CHKPIPE))| $(MAKEDBM) - $(YPDBDIR)/$(DOM)/project.byname;
 123         @(awk 'BEGIN { FS=":"; OFS="\t"; } /^[a-zA-Z0-9_]/ { printf("%-10d ", $$2); print $$0 }' $(DIR)/project $(CHKPIPE)) | $(MAKEDBM) - $(YPDBDIR)/$(DOM)/project.byprojid;
 124         @touch project.time;
 125         @echo "updated project";
 126         @if [ ! $(NOPUSH) ]; then $(YPPUSH) -d $(DOM) project.byname; fi
 127         @if [ ! $(NOPUSH) ]; then $(YPPUSH) -d $(DOM) project.byprojid; fi
 128         @if [ ! $(NOPUSH) ]; then echo "pushed project"; fi
 129 
 130 ipnodes.time: $(INETDIR)/ipnodes
 131         @($(MULTI) -n $(B) -l $(INETDIR)/ipnodes);
 132         @($(STDHOSTS) -wn $(INETDIR)/ipnodes $(CHKPIPE))| \
 133         (awk 'BEGIN { OFS="\t"; } $$1 !~ /^#/ { print $$1, $$0 }' $(CHKPIPE)) | \
 134         $(MAKEDBM) $(B) - $(YPDBDIR)/$(DOM)/ipnodes.byaddr; 
 135         @touch ipnodes.time; 
 136         @echo "updated ipnodes"; 
 137         @if [ ! $(NOPUSH) ]; then $(YPPUSH) -d $(DOM) ipnodes.byname; fi
 138         @if [ ! $(NOPUSH) ]; then $(YPPUSH) -d $(DOM) ipnodes.byaddr; fi
 139         @if [ ! $(NOPUSH) ]; then echo "pushed ipnodes"; fi
 140 
 141 hosts.time: $(DIR)/hosts
 142         @($(MULTI) $(B) -l $(DIR)/hosts);
 143         @($(STDHOSTS) -w $(DIR)/hosts $(CHKPIPE))| \
 144         (awk 'BEGIN { OFS="\t"; } $$1 !~ /^#/ { print $$1, $$0 }' $(CHKPIPE)) | \
 145         $(MAKEDBM) $(B) - $(YPDBDIR)/$(DOM)/hosts.byaddr; 
 146         @touch hosts.time; 
 147         @echo "updated hosts"; 
 148         @if [ ! $(NOPUSH) ]; then $(YPPUSH) -d $(DOM) hosts.byname; fi
 149         @if [ ! $(NOPUSH) ]; then $(YPPUSH) -d $(DOM) hosts.byaddr; fi
 150         @if [ ! $(NOPUSH) ]; then echo "pushed hosts"; fi
 151 
 152 ethers.time: $(DIR)/ethers
 153         @($(STDETHERS) $(DIR)/ethers $(CHKPIPE)) \
 154         |(awk '{print $$1, $$0; for (i = 3;i <= NF;i++) print $$i,$$0}' $(CHKPIPE)) \
 155         | $(MAKEDBM) - $(YPDBDIR)/$(DOM)/ethers.byaddr 
 156 
 157         @(awk 'BEGIN { OFS="\t"; } $$1 !~ /^#/ { print $$2, $$0 }' \
 158            $(DIR)/ethers $(CHKPIPE)) | \
 159         $(MAKEDBM) - $(YPDBDIR)/$(DOM)/ethers.byname;
 160         @touch ethers.time; 
 161         @echo "updated ethers"; 
 162         @if [ ! $(NOPUSH) ]; then $(YPPUSH) -d $(DOM) ethers.byname; fi
 163         @if [ ! $(NOPUSH) ]; then $(YPPUSH) -d $(DOM) ethers.byaddr; fi
 164         @if [ ! $(NOPUSH) ]; then echo "pushed ethers"; fi
 165 
 166 networks.time: $(DIR)/networks
 167         @(sed -e "/^#/d" -e s/#.*$$// $(DIR)/networks $(CHKPIPE)) |( awk \
 168             '{print $$1, $$0; for (i = 3;i <= NF;i++) print $$i,$$0}' \
 169             $(CHKPIPE) )| $(MAKEDBM) - $(YPDBDIR)/$(DOM)/networks.byname; 
 170         @(awk 'BEGIN { OFS="\t"; } $$1 !~ /^#/ { print $$2, $$0 }' \
 171            $(DIR)/networks $(CHKPIPE)) | $(MAKEDBM) - $(YPDBDIR)/$(DOM)/networks.byaddr;
 172         @touch networks.time; 
 173         @echo "updated networks"; 
 174         @if [ ! $(NOPUSH) ]; then $(YPPUSH) -d $(DOM) networks.byname; fi
 175         @if [ ! $(NOPUSH) ]; then $(YPPUSH) -d $(DOM) networks.byaddr; fi
 176         @if [ ! $(NOPUSH) ]; then echo "pushed networks"; fi
 177 
 178 services.time: $(DIR)/services
 179         @(awk 'BEGIN { OFS="\t"; } $$1 !~ /^#/ { print $$2, $$0 }' \
 180             $(DIR)/services $(CHKPIPE))| $(MAKEDBM) - $(YPDBDIR)/$(DOM)/services.byname;
 181         @(awk 'BEGIN { OFS="\t"; } \
 182         $$1 !~ /^#/ { split($$2,pp,"/"); printf("%s/%s %s\n", $$1, pp[2], $$0);\
 183                 if (seen[$$1] == "") {\
 184                         printf("%s %s\n", $$1, $$0); seen[$$1]=$$1;} \
 185                 for (i = 3; i <= NF && $$i !~ /^#/; i++) {\
 186                         if (seen[$$i] == "") {\
 187                                 printf("%s %s\n", $$i, $$0); seen[$$i]=$$i;} \
 188                         printf("%s/%s %s\n", $$i, pp[2], $$0)}}' \
 189                 $(DIR)/services $(CHKPIPE)) | \
 190         $(MAKEDBM) $(B) - $(YPDBDIR)/$(DOM)/services.byservicename
 191 
 192         @touch services.time; 
 193         @echo "updated services"; 
 194         @if [ ! $(NOPUSH) ]; then $(YPPUSH) -d $(DOM) services.byname; fi
 195         @if [ ! $(NOPUSH) ]; then $(YPPUSH) -d $(DOM) services.byservicename; fi
 196         @if [ ! $(NOPUSH) ]; then echo "pushed services"; fi
 197 
 198 rpc.time: $(DIR)/rpc
 199         @(awk 'BEGIN { OFS="\t"; } $$1 !~ /^#/ { print $$2, $$0 }' \
 200             $(DIR)/rpc $(CHKPIPE))| $(MAKEDBM) - $(YPDBDIR)/$(DOM)/rpc.bynumber;
 201         @touch rpc.time; 
 202         @echo "updated rpc"; 
 203         @if [ ! $(NOPUSH) ]; then $(YPPUSH) -d $(DOM) rpc.bynumber; fi
 204         @if [ ! $(NOPUSH) ]; then echo "pushed rpc"; fi
 205 
 206 protocols.time: $(DIR)/protocols
 207         @(awk 'BEGIN { OFS="\t"; } $$1 !~ /^#/ { print $$2, $$0 }' \
 208             $(DIR)/protocols $(CHKPIPE)) | $(MAKEDBM) - \
 209             $(YPDBDIR)/$(DOM)/protocols.bynumber; 
 210 
 211         @(sed -e "/^#/d" -e s/#.*$$// $(DIR)/protocols $(CHKPIPE)) |( awk \
 212             '{print $$1,$$0; for (i = 3;i <= NF;i++) print $$i, $$0}' \
 213             $(CHKPIPE))| $(MAKEDBM) - $(YPDBDIR)/$(DOM)/protocols.byname; 
 214 
 215         @touch protocols.time; 
 216         @echo "updated protocols"; 
 217         @if [ ! $(NOPUSH) ]; then $(YPPUSH) -d $(DOM) protocols.byname; fi
 218         @if [ ! $(NOPUSH) ]; then $(YPPUSH) -d $(DOM) protocols.bynumber; fi
 219         @if [ ! $(NOPUSH) ]; then echo "pushed protocols"; fi
 220 
 221 netgroup.time: $(DIR)/netgroup
 222         @$(MAKEDBM) $(DIR)/netgroup $(YPDBDIR)/$(DOM)/netgroup
 223         @($(REVNETGROUP) < $(DIR)/netgroup -u $(CHKPIPE))| $(MAKEDBM) - $(YPDBDIR)/$(DOM)/netgroup.byuser
 224         @($(REVNETGROUP) < $(DIR)/netgroup -h $(CHKPIPE))| $(MAKEDBM) - $(YPDBDIR)/$(DOM)/netgroup.byhost
 225         @touch netgroup.time; 
 226         @echo "updated netgroup"; 
 227         @if [ ! $(NOPUSH) ]; then $(YPPUSH) -d $(DOM) netgroup; fi
 228         @if [ ! $(NOPUSH) ]; then $(YPPUSH) -d $(DOM) netgroup.byuser; fi
 229         @if [ ! $(NOPUSH) ]; then $(YPPUSH) -d $(DOM) netgroup.byhost; fi
 230         @if [ ! $(NOPUSH) ]; then echo "pushed netgroup"; fi
 231 
 232 bootparams.time: $(DIR)/bootparams
 233         @(sed -e '/^#/d' -e s/#.*$$// -e 's/[    ][      ]*$$//' \
 234             -e '/\\$$/s/\\$$/ /' $(DIR)/bootparams $(CHKPIPE))\
 235         |( awk '/ $$/ {printf "%s", $$0} !/ $$/ {print}' $(CHKPIPE))\
 236         |( sed -e 's/[   ][      ]*/ /g' $(CHKPIPE))\
 237         | $(MAKEDBM) - $(YPDBDIR)/$(DOM)/bootparams;
 238         @touch bootparams.time; 
 239         @echo "updated bootparams"; 
 240         @if [ ! $(NOPUSH) ]; then $(YPPUSH) -d $(DOM) bootparams; fi
 241         @if [ ! $(NOPUSH) ]; then echo "pushed bootparams"; fi
 242 
 243 aliases.time: $(ALIASES)
 244         @cp $(ALIASES) $(YPDBDIR)/$(DOM)/mail.aliases;
 245         @/usr/lib/sendmail -bi -oA$(YPDBDIR)/$(DOM)/mail.aliases;
 246         $(MKALIAS) $(YPDBDIR)/$(DOM)/mail.aliases $(YPDBDIR)/$(DOM)/mail.byaddr;
 247         @rm $(YPDBDIR)/$(DOM)/mail.aliases;
 248         @touch aliases.time;
 249         @echo "updated aliases";
 250         @if [ ! $(NOPUSH) ]; then $(YPPUSH) -d $(DOM) mail.aliases; fi
 251         @if [ ! $(NOPUSH) ]; then $(YPPUSH) -d $(DOM) mail.byaddr; fi
 252         @if [ ! $(NOPUSH) ]; then echo "pushed aliases"; fi
 253 
 254 netmasks.time: $(DIR)/netmasks
 255         $(MAKEDBM) $(DIR)/netmasks $(YPDBDIR)/$(DOM)/netmasks.byaddr; 
 256         @touch netmasks.time; 
 257         @echo "updated netmasks"; 
 258         @if [ ! $(NOPUSH) ]; then $(YPPUSH) -d $(DOM) netmasks.byaddr; fi
 259         @if [ ! $(NOPUSH) ]; then echo "pushed netmasks"; fi
 260 
 261 
 262 publickey.time: $(DIR)/publickey
 263         @(sed "/^#/d" < $(DIR)/publickey $(CHKPIPE))| $(MAKEDBM) - $(YPDBDIR)/$(DOM)/publickey.byname; 
 264         @touch publickey.time; 
 265         @echo "updated publickey"; 
 266         @if [ ! $(NOPUSH) ]; then $(YPPUSH) -d $(DOM) publickey.byname; fi
 267         @if [ ! $(NOPUSH) ]; then echo "pushed publickey"; fi
 268 
 269 netid.time: $(PWDIR)/passwd $(DIR)/group $(DIR)/hosts $(DIR)/netid
 270         @$(MKNETID) -q -p $(PWDIR)/passwd -g $(DIR)/group -h $(DIR)/hosts -m $(DIR)/netid > .ypjunk; 
 271         @$(MAKEDBM) .ypjunk $(YPDBDIR)/$(DOM)/netid.byname; 
 272         @rm -f .ypjunk; 
 273         @touch netid.time; 
 274         @echo "updated netid"; 
 275         @if [ ! $(NOPUSH) ]; then $(YPPUSH) -d $(DOM) netid.byname; fi
 276         @if [ ! $(NOPUSH) ]; then echo "pushed netid"; fi
 277 
 278 # Old way.  Could be restored by PSARC decision.
 279 #
 280 #passwd.adjunct.time: $(PWDIR)/security/passwd.adjunct
 281 #       @(awk 'BEGIN { FS=":"; OFS="\t"; } /^[a-zA-Z0-9_]/ { print $$1, $$0 }' $(PWDIR)/security/passwd.adjunct $(CHKPIPE)) | \
 282 #               $(MAKEDBM) -s - $(YPDBDIR)/$(DOM)/passwd.adjunct.byname;
 283 #       @chmod 600 $(YPDBDIR)/$(DOM)/passwd.adjunct.byname.dir; 
 284 #       @chmod 600 $(YPDBDIR)/$(DOM)/passwd.adjunct.byname.pag; 
 285 #       @touch passwd.adjunct.time 
 286 #       @echo "updated passwd.adjunct"; 
 287 #       @if [ ! $(NOPUSH) ]; then $(YPPUSH) -d $(DOM) passwd.adjunct.byname; fi
 288 #       @if [ ! $(NOPUSH) ]; then echo "pushed passwd.adjunct"; fi
 289 
 290 passwd.adjunct.time: $(PWDIR)/security/passwd.adjunct $(PWDIR)/shadow
 291         -@if [ -f $(PWDIR)/shadow ]; then \
 292                 (/usr/xpg4/bin/awk 'BEGIN { FS=":"; while (getline < "$(PWDIR)/shadow" > 0) shadow[$$1] = $$2; } /^[a-zA-Z0-9_]/ { $$2 = shadow[$$1]; OFS=":"; printf "%s\t%s\n", $$1, $$0 }' $(PWDIR)/security/passwd.adjunct $(CHKPIPE)) | $(MAKEDBM) -s - $(YPDBDIR)/$(DOM)/passwd.adjunct.byname; \
 293         else \
 294                 (awk 'BEGIN { FS=":"; OFS="\t"; } /^[a-zA-Z0-9_]/ { print $$1, $$0 }' $(PWDIR)/security/passwd.adjunct $(CHKPIPE)) | \
 295                 $(MAKEDBM) -s - $(YPDBDIR)/$(DOM)/passwd.adjunct.byname; \
 296         fi
 297         @chmod 600 $(YPDBDIR)/$(DOM)/passwd.adjunct.byname.dir; 
 298         @chmod 600 $(YPDBDIR)/$(DOM)/passwd.adjunct.byname.pag; 
 299         @touch passwd.adjunct.time 
 300         @echo "updated passwd.adjunct"; 
 301         @if [ ! $(NOPUSH) ]; then $(YPPUSH) -d $(DOM) passwd.adjunct.byname; fi
 302         @if [ ! $(NOPUSH) ]; then echo "pushed passwd.adjunct"; fi
 303 
 304 group.adjunct.time: $(PWDIR)/security/group.adjunct
 305         @(awk 'BEGIN { FS=":"; OFS="\t"; } /^[a-zA-Z0-9_]/ { print $$1, $$0 }' $(PWDIR)/security/group.adjunct $(CHKPIPE)) | \
 306         $(MAKEDBM) -s - $(YPDBDIR)/$(DOM)/group.adjunct.byname; 
 307         @chmod 600 $(YPDBDIR)/$(DOM)/group.adjunct.byname.dir; 
 308         @chmod 600 $(YPDBDIR)/$(DOM)/group.adjunct.byname.pag; 
 309         @touch group.adjunct.time 
 310         @echo "updated group.adjunct"; 
 311         @if [ ! $(NOPUSH) ]; then $(YPPUSH) -d $(DOM) group.adjunct.byname; fi
 312         @if [ ! $(NOPUSH) ]; then echo "pushed group.adjunct"; fi
 313 
 314 timezone.time:  $(DIR)/timezone
 315         -@if [ -f $(DIR)/timezone ]; then \
 316                 sed -e "/^#/d" -e s/#.*$$// $(DIR)/timezone \
 317                 | awk '{for (i = 2; i<=NF; i++) print $$i, $$0}' \
 318                 | $(MAKEDBM) - $(YPDBDIR)/$(DOM)/timezone.byname; \
 319                 touch timezone.time; \
 320                 echo "updated timezone"; \
 321                 if [ ! $(NOPUSH) ]; then \
 322                         $(YPPUSH) timezone.byname; \
 323                         echo "pushed timezone"; \
 324                 else \
 325                 : ; \
 326                 fi \
 327         else \
 328                 echo "couldn't find $(DIR)/timezone"; \
 329         fi
 330 
 331 auto.master.time:  $(DIR)/auto_master
 332         -@if [ -f $(DIR)/auto_master ]; then \
 333                 sed -e "/^#/d" -e s/#.*$$// $(DIR)/auto_master \
 334                 | $(MAKEDBM) - $(YPDBDIR)/$(DOM)/auto.master; \
 335                 touch auto.master.time; \
 336                 echo "updated auto.master"; \
 337                 if [ ! $(NOPUSH) ]; then \
 338                         $(YPPUSH) auto.master; \
 339                         echo "pushed auto.master"; \
 340                 else \
 341                 : ; \
 342                 fi \
 343         else \
 344                 echo "couldn't find $(DIR)/auto_master"; \
 345         fi
 346 
 347 auto.home.time:  $(DIR)/auto_home
 348         -@if [ -f $(DIR)/auto_home ]; then \
 349                 sed -e "/^#/d" -e s/#.*$$// $(DIR)/auto_home \
 350                 | $(MAKEDBM) - $(YPDBDIR)/$(DOM)/auto.home; \
 351                 touch auto.home.time; \
 352                 echo "updated auto.home"; \
 353                 if [ ! $(NOPUSH) ]; then \
 354                         $(YPPUSH) auto.home; \
 355                         echo "pushed auto.home"; \
 356                 else \
 357                 : ; \
 358                 fi \
 359         else \
 360                 echo "couldn't find $(DIR)/auto_home"; \
 361         fi
 362 
 363 
 364 auth.attr.time:  $(RBACDIR)/auth_attr
 365         -@if [ -f $(RBACDIR)/auth_attr ]; then \
 366                 sed -e "/^#/d" -e s/#.*$$// $(RBACDIR)/auth_attr \
 367                 |sed -e '/\\$$/{:l' -e 'N;s/\\\n//;t h' -e ':h' \
 368                 -e 's/\\$$/\\/;t l' -e } \
 369                 | (/usr/xpg4/bin/awk 'BEGIN { FS=":"; OFS=":" } /^[a-zA-Z0-9_]/ \
 370                 {printf "%s:%s\n", $$1, $$0 }' $(CHKPIPE)) \
 371                 | $(MAKEDBM) -S ":" -E - $(YPDBDIR)/$(DOM)/auth_attr; \
 372                 touch auth.attr.time; \
 373                 echo "updated auth_attr"; \
 374                 if [ ! $(NOPUSH) ]; then \
 375                         $(YPPUSH) auth_attr; \
 376                         echo "pushed auth_attr"; \
 377                 else \
 378                 : ; \
 379                 fi \
 380         else \
 381                 echo "couldn't find $(RBACDIR)/auth_attr"; \
 382         fi
 383 
 384 exec.attr.time:  $(RBACDIR)/exec_attr
 385         -@if [ -f $(RBACDIR)/exec_attr ]; then \
 386                 sed -e "/^#/d" -e s/#.*$$// $(RBACDIR)/exec_attr \
 387                 |sed -e '/\\$$/{:l' -e 'N;s/\\\n//;t h' -e ':h' \
 388                 -e 's/\\$$/\\/;t l' -e } \
 389                 | (/usr/xpg4/bin/awk 'BEGIN { FS=":"; OFS=":" } /^[a-zA-Z0-9_]/ \
 390                 {printf "%s:%s:%s:%s\n", $$1, $$2, $$6, $$0 }' $(CHKPIPE)) \
 391                 | $(MAKEDBM) -S ":" -E -D 2 - $(YPDBDIR)/$(DOM)/exec_attr; \
 392                 touch exec.attr.time; \
 393                 echo "updated exec_attr"; \
 394                 if [ ! $(NOPUSH) ]; then \
 395                         $(YPPUSH) exec_attr; \
 396                         echo "pushed exec_attr"; \
 397                 else \
 398                 : ; \
 399                 fi \
 400         else \
 401                 echo "couldn't find $(RBACDIR)/exec_attr"; \
 402         fi
 403 
 404 prof.attr.time:  $(RBACDIR)/prof_attr
 405         -@if [ -f $(RBACDIR)/prof_attr ]; then \
 406                 sed -e "/^#/d" -e s/#.*$$// $(RBACDIR)/prof_attr \
 407                 |sed -e '/\\$$/{:l' -e 'N;s/\\\n//;t h' -e ':h' \
 408                 -e 's/\\$$/\\/;t l' -e } \
 409                 | (/usr/xpg4/bin/awk 'BEGIN { FS=":"; OFS=":" } /^[a-zA-Z0-9_]/ \
 410                 {printf "%s:%s\n", $$1, $$0 }' $(CHKPIPE)) \
 411                 | $(MAKEDBM) -S ":" -E - $(YPDBDIR)/$(DOM)/prof_attr; \
 412                 touch prof.attr.time; \
 413                 echo "updated prof_attr"; \
 414                 if [ ! $(NOPUSH) ]; then \
 415                         $(YPPUSH) prof_attr; \
 416                         echo "pushed prof_attr"; \
 417                 else \
 418                 : ; \
 419                 fi \
 420         else \
 421                 echo "couldn't find $(RBACDIR)/prof_attr"; \
 422         fi
 423 
 424 user.attr.time:  $(DIR)/user_attr
 425         -@if [ -f $(DIR)/user_attr ]; then \
 426                 sed -e "/^#/d" -e s/#.*$$// $(DIR)/user_attr \
 427                 |sed -e '/\\$$/{:l' -e 'N;s/\\\n//;t h' -e ':h' \
 428                 -e 's/\\$$/\\/;t l' -e } \
 429                 | (/usr/xpg4/bin/awk 'BEGIN { FS=":"; OFS=":" } /^[a-zA-Z0-9_]/ \
 430                 {printf "%s:%s\n", $$1, $$0 }' $(CHKPIPE)) \
 431                 | $(MAKEDBM) -S ":" -E - $(YPDBDIR)/$(DOM)/user_attr; \
 432                 touch user.attr.time; \
 433                 echo "updated user_attr"; \
 434                 if [ ! $(NOPUSH) ]; then \
 435                         $(YPPUSH) user_attr; \
 436                         echo "pushed user_attr"; \
 437                 else \
 438                 : ; \
 439                 fi \
 440         else \
 441                 echo "couldn't find $(DIR)/user_attr"; \
 442         fi
 443 
 444 ageing.time:  $(PWDIR)/shadow
 445         -@if [ -f $(PWDIR)/shadow ]; then \
 446                 (awk 'BEGIN {FS=":"; OFS=":"} $$1 !~ /^#/ {printf "%s\t%s:%s:%s:%s:%s:%s:%s:%s\n", $$1,$$1,$$3,$$4,$$5,$$6,$$7,$$8,$$9}' $(PWDIR)/shadow) | $(MAKEDBM) - $(YPDBDIR)/$(DOM)/ageing.byname; \
 447                 touch ageing.time; \
 448                 echo "updated ageing"; \
 449         else \
 450                 echo "couldn't find $(PWDIR)/shadow"; \
 451         fi
 452 
 453 passwd: passwd.time
 454 group: group.time
 455 project: project.time
 456 hosts: hosts.time
 457 ipnodes: ipnodes.time
 458 ethers: ethers.time
 459 networks: networks.time
 460 rpc: rpc.time
 461 services: services.time
 462 protocols: protocols.time
 463 netgroup: netgroup.time
 464 bootparams: bootparams.time
 465 aliases: aliases.time
 466 publickey: publickey.time
 467 netid: netid.time
 468 passwd.adjunct: passwd.adjunct.time
 469 group.adjunct: group.adjunct.time
 470 netmasks: netmasks.time
 471 timezone: timezone.time
 472 auto.master: auto.master.time
 473 auto.home: auto.home.time
 474 auth.attr:auth.attr.time
 475 exec.attr:exec.attr.time
 476 prof.attr:prof.attr.time
 477 user.attr:user.attr.time
 478 $(DIR)/netid:
 479 $(DIR)/timezone:
 480 $(DIR)/auto_master:
 481 $(DIR)/auto_home:
 482 $(PWDIR)/shadow:
 483 $(DIR)/auth_attr:
 484 $(DIR)/exec_attr:
 485 $(DIR)/prof_attr:
 486 $(DIR)/user_attr:
 487 ageing: ageing.time