This repository has been archived by the owner on Oct 12, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathTargetdirs
executable file
·350 lines (317 loc) · 7.28 KB
/
Targetdirs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
#
#ident "@(#)Targetdirs 1.36 95/07/10 SMI" /* SVr4.0 1.2.2.8 */
#
# Copyright (c) 1989 by Sun Microsystems, Inc.
#
#
# The list is built of owner-group combinations. ROOT.SYS occurs twice
# because some directories owned by root and in group sys are subdirectories
# of directories having other owner-group attributes.
#
# It is easier to think in terms of directory names without the ROOT macro
# prefix. ROOTDIRS is TARGETDIRS with ROOT prefixes. It is necessary
# to work with ROOT prefixes when controlling conditional assignments.
#
# Symbolic links are added to the end of the list when IFNOTPROTO is not
# '#', as when the superuser is doing a full build with ownerships and
# output is going to a ROOT which is not /proto. SYMLINKS are omitted
# otherwise, because the NSE stumbles over them too often. Hence the
# use of IFNOTPROTO before the incremental assignment of SYMLINKS to
# TARGETDIRS.
#
# The macro SYM.ROOT.SYS means symlinks with owner root and group sys.
IFNOTPROTO:sh= echo \\043
$(CH) IFNOTPROTO=
SYMLINKS= $(SYM.ROOT.SYS) $(SYM.ROOT.BIN) $(SYM.BIN.BIN) $(SYM.OTHERS)
TARGETDIRS= $(ROOT.SYS) $(ROOT.BIN) $(BIN.BIN) $(ROOT.SYS2) \
$(UUCP.UUCP) $(OTHERS)
$(IFNOTPROTO) TARGETDIRS += $(SYMLINKS)
ROOT.SYS= \
/dev \
/dev/dsk \
/dev/fd \
/dev/rdsk \
/dev/rmt \
/dev/pts \
/dev/sad \
/dev/swap \
/devices \
/etc \
/etc/cron.d \
/etc/default \
/etc/dfs \
/etc/fs \
/etc/fs/nfs \
/etc/fs/proc \
/etc/init.d \
/etc/lib \
/etc/opt \
/etc/rcS.d \
/etc/rc0.d \
/etc/rc1.d \
/etc/rc2.d \
/etc/rc3.d \
/etc/tm \
/export \
/home \
/kernel \
/mnt \
/opt \
/platform \
/proc \
/sbin \
/usr \
/usr/kernel \
/usr/platform \
/usr/share \
/var \
/var/adm \
/var/cron \
/var/log \
/var/opt \
/var/sadm
ROOT.BIN= \
/usr/bin \
/usr/demo \
/usr/games \
/usr/include \
/usr/lib \
/usr/4lib \
/usr/lib/class \
/usr/lib/class/RT \
/usr/lib/class/TS \
/usr/lib/class/IA \
/usr/lib/saf \
/usr/old \
/usr/openwin \
/usr/sbin \
/usr/sbin/static \
/usr/ucb \
/usr/xpg4 \
/usr/xpg4/bin \
/usr/lib/localedef \
/usr/lib/localedef/charmap \
/usr/lib/localedef/src \
/var/spool
BIN.BIN= \
/etc/saf \
/usr/ccs \
/usr/ccs/bin \
/usr/ccs/lib \
/usr/ccs/lib/fp \
/usr/ccs/lib/fp/libp \
/usr/kvm \
/usr/lib/font \
/usr/lib/libp \
/usr/lib/term \
/usr/proc \
/usr/proc/bin \
/usr/proc/lib \
/usr/sadm \
/usr/sadm/sysadm \
/usr/sadm/sysadm/add-ons \
/usr/share/man \
/var/news \
/var/preserve \
/var/saf \
/var/spool/pkg
ROOT.SYS2= \
/usr/lib/fs \
/usr/lib/fs/nfs \
/usr/lib/fs/proc \
/usr/lib/nfs \
/usr/net \
/usr/net/servers \
/usr/share/lib \
/usr/share/src \
/var/spool/cron \
/var/spool/cron/atjobs \
/var/spool/cron/crontabs
UUCP.UUCP= \
/var/spool/uucp \
/var/spool/uucppublic \
/var/uucp
OTHERS= \
/dev/term \
/tmp \
/etc/mail \
/usr/lib/sa \
/usr/share/lib/tmac \
/var/adm/log \
/var/adm/passwd \
/var/adm/sa \
/var/mail \
/var/spool/lp \
/var/tmp
# /var/mail/:saved is built directly by the rootdirs target in
# /usr/src/Makefile because of the colon in its name.
# macros for symbolic links
SYM.ROOT.SYS= \
/dev/stdin \
/dev/stdout \
/dev/stderr \
/usr/adm \
/usr/lib/cron \
/usr/man \
/usr/pub
SYM.ROOT.BIN= \
/bin \
/lib \
/usr/spool
SYM.BIN.BIN= \
/usr/lib/tmac \
/usr/news \
/usr/preserve \
/usr/src
SYM.OTHERS= \
/etc/log \
/usr/mail \
/usr/tmp
# prepend the ROOT prefix
ROOTDIRS= $(TARGETDIRS:%=$(ROOT)%)
# conditional assignments
#
# Target directories with non-default values for owner and group must
# be referenced here, using their fully-prefixed names, and the non-
# default values assigned. If a directory is mentioned above and not
# mentioned below, it has default values for attributes.
#
# The default values for OWNER, GROUP, and DIRMODE are specified in
# /usr/src/Makefile.master.
#
$(ROOT)/dev/term \
$(ROOT)/usr/mail \
$(ROOT)/var/mail \
$(ROOT.SYS:%=$(ROOT)%) \
$(ROOT.BIN:%=$(ROOT)%) \
$(ROOT.SYS2:%=$(ROOT)%) \
$(SYM.ROOT.SYS:%=$(ROOT)%) \
$(SYM.ROOT.BIN:%=$(ROOT)%):= OWNER= root
$(ROOT)/tmp \
$(ROOT)/usr/tmp \
$(ROOT)/var/tmp \
$(ROOT)/var/adm/sa \
$(ROOT.SYS:%=$(ROOT)%) \
$(ROOT.SYS2:%=$(ROOT)%) \
$(SYM.ROOT.SYS:%=$(ROOT)%):= GROUP= sys
$(ROOT)/dev/term:= GROUP= root
$(UUCP.UUCP:%=$(ROOT)%):= OWNER= uucp
$(UUCP.UUCP:%=$(ROOT)%):= GROUP= uucp
$(ROOT)/tmp \
$(ROOT)/usr/tmp \
$(ROOT)/var/tmp:= OWNER= sys
$(ROOT)/etc/log \
$(ROOT)/usr/lib/sa \
$(ROOT)/var/adm/log \
$(ROOT)/var/adm/passwd \
$(ROOT)/var/adm/sa:= OWNER= adm
$(ROOT)/etc/log \
$(ROOT)/var/adm/log \
$(ROOT)/var/adm/passwd:= GROUP= adm
$(ROOT)/etc/mail \
$(ROOT)/usr/mail \
$(ROOT)/var/mail := GROUP= mail
$(ROOT)/var/spool/lp:= OWNER= lp
$(ROOT)/var/spool/lp:= GROUP= tty
# file mode
#
$(ROOT)/tmp \
$(ROOT)/var/tmp \
$(ROOT)/var/spool/uucppublic:= DIRMODE= 1777
$(ROOT)/var/news \
$(ROOT)/var/preserve \
$(ROOT)/var/spool/pkg:= DIRMODE= 777
$(ROOT)/dev \
$(ROOT)/dev/fd \
$(ROOT)/dev/dsk \
$(ROOT)/dev/rdsk \
$(ROOT)/dev/rmt \
$(ROOT)/dev/pts \
$(ROOT)/dev/sad \
$(ROOT)/dev/swap \
$(ROOT)/dev/term \
$(ROOT)/devices \
$(ROOT)/etc \
$(ROOT)/etc/default \
$(ROOT)/etc/dfs \
$(ROOT)/etc/fs \
$(ROOT)/etc/fs/proc \
$(ROOT)/etc/init.d \
$(ROOT)/etc/lib \
$(ROOT)/etc/mail \
$(ROOT)/etc/opt \
$(ROOT)/etc/rcS.d \
$(ROOT)/etc/rc0.d \
$(ROOT)/etc/rc1.d \
$(ROOT)/etc/rc2.d \
$(ROOT)/etc/rc3.d \
$(ROOT)/etc/tm \
$(ROOT)/export \
$(ROOT)/home \
$(ROOT)/mnt \
$(ROOT)/opt \
$(ROOT)/sbin \
$(ROOT)/usr \
$(ROOT)/usr/bin \
$(ROOT)/usr/demo \
$(ROOT)/usr/games \
$(ROOT)/usr/include \
$(ROOT)/usr/kvm \
$(ROOT)/usr/lib \
$(ROOT)/usr/4lib \
$(ROOT)/usr/lib/cftime \
$(ROOT)/usr/lib/chrclass \
$(ROOT)/usr/lib/chrtbl \
$(ROOT)/usr/lib/class \
$(ROOT)/usr/lib/class/RT \
$(ROOT)/usr/lib/class/TS \
$(ROOT)/usr/lib/class/IA \
$(ROOT)/usr/lib/font \
$(ROOT)/usr/lib/fs \
$(ROOT)/usr/lib/fs/proc \
$(ROOT)/usr/lib/libp \
$(ROOT)/usr/lib/sa \
$(ROOT)/usr/lib/saf \
$(ROOT)/usr/lib/term \
$(ROOT)/usr/lib/tmac \
$(ROOT)/usr/net \
$(ROOT)/usr/net/servers \
$(ROOT)/usr/old \
$(ROOT)/usr/openwin \
$(ROOT)/usr/sbin \
$(ROOT)/usr/sbin/static \
$(ROOT)/usr/share/lib/tmac \
$(ROOT)/usr/ucb \
$(ROOT)/var \
$(ROOT)/var/adm \
$(ROOT)/var/adm/log \
$(ROOT)/var/adm/passwd \
$(ROOT)/var/adm/sa \
$(ROOT)/var/opt \
$(ROOT)/var/spool := DIRMODE=775
$(ROOT)/var/mail:= DIRMODE=1777
# symlink assignments, LINKDEST is the value of the symlink
#
$(ROOT)/usr/lib/cron:= LINKDEST=../../etc/cron.d
$(ROOT)/bin:= LINKDEST=usr/bin
$(ROOT)/lib:= LINKDEST=usr/lib
$(ROOT)/dev/stdin:= LINKDEST=fd/0
$(ROOT)/dev/stdout:= LINKDEST=fd/1
$(ROOT)/dev/stderr:= LINKDEST=fd/2
$(ROOT)/usr/pub:= LINKDEST=share/lib/pub
$(ROOT)/usr/man:= LINKDEST=share/man
$(ROOT)/usr/src:= LINKDEST=share/src
$(ROOT)/usr/adm:= LINKDEST=../var/adm
$(ROOT)/etc/log:= LINKDEST=../var/adm/log
$(ROOT)/usr/mail:= LINKDEST=../var/mail
$(ROOT)/usr/news:= LINKDEST=../var/news
$(ROOT)/usr/preserve:= LINKDEST=../var/preserve
$(ROOT)/usr/spool:= LINKDEST=../var/spool
$(ROOT)/usr/tmp:= LINKDEST=../var/tmp
$(ROOT)/usr/lib/tmac:= LINKDEST=../share/lib/tmac
# Installing a directory symlink calls for overriding INS.dir to install
# a symlink.
#
$(SYMLINKS:%=$(ROOT)%):= \
INS.dir= -$(RM) -r $@; $(SYMLINK) $(LINKDEST) $@; \
$(CHOWN) $(OWNER) $@; $(CHGRP) $(GROUP) $@