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