Print this page
XXX Remove nawk(1)

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/ypcmd/net_files/Makefile
          +++ new/usr/src/cmd/ypcmd/net_files/Makefile
↓ open down ↓ 86 lines elided ↑ open up ↑
  87   87          -@if [ -f $(PWDIR)/security/passwd.adjunct ]; then \
  88   88                  if [ ! $(NOPUSH) ]; then $(MAKE)  $(MFLAGS) -k \
  89   89                  passwd.adjunct.time group.adjunct.time; \
  90   90                  else $(MAKE) $(MFLAGS) -k NOPUSH=$(NOPUSH) \
  91   91                  passwd.adjunct.time group.adjunct.time; \
  92   92                  fi; \
  93   93          fi
  94   94  
  95   95  passwd.time: $(PWDIR)/passwd $(PWDIR)/shadow
  96   96          -@if [ -f $(PWDIR)/security/passwd.adjunct ]; then \
  97      -                (nawk '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      -                (nawk 'BEGIN { FS=":"; OFS=":"  } /^[a-zA-Z0-9_]/ { $$2 = "##" $$1; printf "%-10d\t%s\n", $$3, $$0 }' $(PWDIR)/passwd $(CHKPIPE)) | $(MAKEDBM) - $(YPDBDIR)/$(DOM)/passwd.byuid; \
       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   99          elif [ -f $(PWDIR)/shadow ]; then \
 100      -                (nawk '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      -                (nawk '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; \
      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  102          else \
 103  103                  (awk 'BEGIN { FS=":"; OFS="\t"; } /^[a-zA-Z0-9_]/ { print $$1, $$0 }' $(PWDIR)/passwd  $(CHKPIPE))| $(MAKEDBM) - $(YPDBDIR)/$(DOM)/passwd.byname; \
 104  104                  (awk 'BEGIN { FS=":"; OFS="\t"; } /^[a-zA-Z0-9_]/ { printf("%-10d ", $$3); print $$0 }' $(PWDIR)/passwd $(CHKPIPE))| $(MAKEDBM) - $(YPDBDIR)/$(DOM)/passwd.byuid; \
 105  105          fi
 106  106          @touch passwd.time; 
 107  107          @echo "updated passwd"; 
 108  108          @if [ ! $(NOPUSH) ]; then $(YPPUSH) -d $(DOM) passwd.byname; fi
 109  109          @if [ ! $(NOPUSH) ]; then $(YPPUSH) -d $(DOM) passwd.byuid; fi
 110  110          @if [ ! $(NOPUSH) ]; then echo "pushed passwd"; fi
 111  111  
↓ open down ↓ 170 lines elided ↑ open up ↑
 282  282  #               $(MAKEDBM) -s - $(YPDBDIR)/$(DOM)/passwd.adjunct.byname;
 283  283  #       @chmod 600 $(YPDBDIR)/$(DOM)/passwd.adjunct.byname.dir; 
 284  284  #       @chmod 600 $(YPDBDIR)/$(DOM)/passwd.adjunct.byname.pag; 
 285  285  #       @touch passwd.adjunct.time 
 286  286  #       @echo "updated passwd.adjunct"; 
 287  287  #       @if [ ! $(NOPUSH) ]; then $(YPPUSH) -d $(DOM) passwd.adjunct.byname; fi
 288  288  #       @if [ ! $(NOPUSH) ]; then echo "pushed passwd.adjunct"; fi
 289  289  
 290  290  passwd.adjunct.time: $(PWDIR)/security/passwd.adjunct $(PWDIR)/shadow
 291  291          -@if [ -f $(PWDIR)/shadow ]; then \
 292      -                (nawk '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; \
      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  293          else \
 294  294                  (awk 'BEGIN { FS=":"; OFS="\t"; } /^[a-zA-Z0-9_]/ { print $$1, $$0 }' $(PWDIR)/security/passwd.adjunct $(CHKPIPE)) | \
 295  295                  $(MAKEDBM) -s - $(YPDBDIR)/$(DOM)/passwd.adjunct.byname; \
 296  296          fi
 297  297          @chmod 600 $(YPDBDIR)/$(DOM)/passwd.adjunct.byname.dir; 
 298  298          @chmod 600 $(YPDBDIR)/$(DOM)/passwd.adjunct.byname.pag; 
 299  299          @touch passwd.adjunct.time 
 300  300          @echo "updated passwd.adjunct"; 
 301  301          @if [ ! $(NOPUSH) ]; then $(YPPUSH) -d $(DOM) passwd.adjunct.byname; fi
 302  302          @if [ ! $(NOPUSH) ]; then echo "pushed passwd.adjunct"; fi
↓ open down ↓ 56 lines elided ↑ open up ↑
 359  359          else \
 360  360                  echo "couldn't find $(DIR)/auto_home"; \
 361  361          fi
 362  362  
 363  363  
 364  364  auth.attr.time:  $(RBACDIR)/auth_attr
 365  365          -@if [ -f $(RBACDIR)/auth_attr ]; then \
 366  366                  sed -e "/^#/d" -e s/#.*$$// $(RBACDIR)/auth_attr \
 367  367                  |sed -e '/\\$$/{:l' -e 'N;s/\\\n//;t h' -e ':h' \
 368  368                  -e 's/\\$$/\\/;t l' -e } \
 369      -                | (nawk 'BEGIN { FS=":"; OFS=":" } /^[a-zA-Z0-9_]/ \
      369 +                | (/usr/xpg4/bin/awk 'BEGIN { FS=":"; OFS=":" } /^[a-zA-Z0-9_]/ \
 370  370                  {printf "%s:%s\n", $$1, $$0 }' $(CHKPIPE)) \
 371  371                  | $(MAKEDBM) -S ":" -E - $(YPDBDIR)/$(DOM)/auth_attr; \
 372  372                  touch auth.attr.time; \
 373  373                  echo "updated auth_attr"; \
 374  374                  if [ ! $(NOPUSH) ]; then \
 375  375                          $(YPPUSH) auth_attr; \
 376  376                          echo "pushed auth_attr"; \
 377  377                  else \
 378  378                  : ; \
 379  379                  fi \
 380  380          else \
 381  381                  echo "couldn't find $(RBACDIR)/auth_attr"; \
 382  382          fi
 383  383  
 384  384  exec.attr.time:  $(RBACDIR)/exec_attr
 385  385          -@if [ -f $(RBACDIR)/exec_attr ]; then \
 386  386                  sed -e "/^#/d" -e s/#.*$$// $(RBACDIR)/exec_attr \
 387  387                  |sed -e '/\\$$/{:l' -e 'N;s/\\\n//;t h' -e ':h' \
 388  388                  -e 's/\\$$/\\/;t l' -e } \
 389      -                | (nawk 'BEGIN { FS=":"; OFS=":" } /^[a-zA-Z0-9_]/ \
      389 +                | (/usr/xpg4/bin/awk 'BEGIN { FS=":"; OFS=":" } /^[a-zA-Z0-9_]/ \
 390  390                  {printf "%s:%s:%s:%s\n", $$1, $$2, $$6, $$0 }' $(CHKPIPE)) \
 391  391                  | $(MAKEDBM) -S ":" -E -D 2 - $(YPDBDIR)/$(DOM)/exec_attr; \
 392  392                  touch exec.attr.time; \
 393  393                  echo "updated exec_attr"; \
 394  394                  if [ ! $(NOPUSH) ]; then \
 395  395                          $(YPPUSH) exec_attr; \
 396  396                          echo "pushed exec_attr"; \
 397  397                  else \
 398  398                  : ; \
 399  399                  fi \
 400  400          else \
 401  401                  echo "couldn't find $(RBACDIR)/exec_attr"; \
 402  402          fi
 403  403  
 404  404  prof.attr.time:  $(RBACDIR)/prof_attr
 405  405          -@if [ -f $(RBACDIR)/prof_attr ]; then \
 406  406                  sed -e "/^#/d" -e s/#.*$$// $(RBACDIR)/prof_attr \
 407  407                  |sed -e '/\\$$/{:l' -e 'N;s/\\\n//;t h' -e ':h' \
 408  408                  -e 's/\\$$/\\/;t l' -e } \
 409      -                | (nawk 'BEGIN { FS=":"; OFS=":" } /^[a-zA-Z0-9_]/ \
      409 +                | (/usr/xpg4/bin/awk 'BEGIN { FS=":"; OFS=":" } /^[a-zA-Z0-9_]/ \
 410  410                  {printf "%s:%s\n", $$1, $$0 }' $(CHKPIPE)) \
 411  411                  | $(MAKEDBM) -S ":" -E - $(YPDBDIR)/$(DOM)/prof_attr; \
 412  412                  touch prof.attr.time; \
 413  413                  echo "updated prof_attr"; \
 414  414                  if [ ! $(NOPUSH) ]; then \
 415  415                          $(YPPUSH) prof_attr; \
 416  416                          echo "pushed prof_attr"; \
 417  417                  else \
 418  418                  : ; \
 419  419                  fi \
 420  420          else \
 421  421                  echo "couldn't find $(RBACDIR)/prof_attr"; \
 422  422          fi
 423  423  
 424  424  user.attr.time:  $(DIR)/user_attr
 425  425          -@if [ -f $(DIR)/user_attr ]; then \
 426  426                  sed -e "/^#/d" -e s/#.*$$// $(DIR)/user_attr \
 427  427                  |sed -e '/\\$$/{:l' -e 'N;s/\\\n//;t h' -e ':h' \
 428  428                  -e 's/\\$$/\\/;t l' -e } \
 429      -                | (nawk 'BEGIN { FS=":"; OFS=":" } /^[a-zA-Z0-9_]/ \
      429 +                | (/usr/xpg4/bin/awk 'BEGIN { FS=":"; OFS=":" } /^[a-zA-Z0-9_]/ \
 430  430                  {printf "%s:%s\n", $$1, $$0 }' $(CHKPIPE)) \
 431  431                  | $(MAKEDBM) -S ":" -E - $(YPDBDIR)/$(DOM)/user_attr; \
 432  432                  touch user.attr.time; \
 433  433                  echo "updated user_attr"; \
 434  434                  if [ ! $(NOPUSH) ]; then \
 435  435                          $(YPPUSH) user_attr; \
 436  436                          echo "pushed user_attr"; \
 437  437                  else \
 438  438                  : ; \
 439  439                  fi \
↓ open down ↓ 48 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX