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