author | th199096 |
Mon, 02 Apr 2007 21:38:04 -0700 | |
changeset 3957 | 86c9dda5df37 |
parent 3948 | b8d304c37bf9 |
child 3968 | abb9a4c15e2f |
permissions | -rw-r--r-- |
0 | 1 |
#!/bin/ksh |
2 |
# |
|
3 |
# CDDL HEADER START |
|
4 |
# |
|
5 |
# The contents of this file are subject to the terms of the |
|
1106 | 6 |
# Common Development and Distribution License (the "License"). |
7 |
# You may not use this file except in compliance with the License. |
|
0 | 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 |
# |
|
132 | 22 |
|
0 | 23 |
# |
3385 | 24 |
# Copyright 2007 Sun Microsystems, Inc. All rights reserved. |
0 | 25 |
# Use is subject to license terms. |
26 |
# |
|
27 |
# ident "%Z%%M% %I% %E% SMI" |
|
28 |
# |
|
29 |
# Upgrade a machine from a cpio archive area in about 5 minutes. |
|
30 |
# By Roger Faulkner and Jeff Bonwick, April 1993. |
|
31 |
# (bfu == Bonwick/Faulkner Upgrade, a.k.a. Blindingly Fast Upgrade) |
|
32 |
# |
|
33 |
# Usage: bfu [-f] <archive_dir> [root-dir] # for normal machines |
|
34 |
# bfu -c [-f] <archive_dir> <exec-dir> # for diskless clients |
|
35 |
# |
|
36 |
# The -f flag is to override the built-in safety check which requires |
|
37 |
# that the starting-point OS be a least a certain revision. |
|
38 |
# |
|
39 |
# You have to be super-user. It's safest to run this from the |
|
40 |
# system console, although I've run it under OW and even via |
|
41 |
# remote login with no problems. |
|
42 |
# |
|
43 |
# You will have to reboot the system when the upgrade is complete. |
|
44 |
# |
|
45 |
# You should add any administrative files you care about to this list. |
|
46 |
# Warning: there had better be no leading '/' on any of these filenames. |
|
47 |
||
48 |
# |
|
49 |
# The CDPATH variable causes ksh's `cd' builtin to emit messages to stdout |
|
50 |
# under certain circumstances, which can really screw things up; unset it. |
|
51 |
# |
|
52 |
unset CDPATH |
|
53 |
||
54 |
export LC_ALL="C" |
|
55 |
||
56 |
if [ -z "$GATEPATH" ]; then |
|
57 |
GATEPATH=/ws/onnv-gate |
|
58 |
test -d $GATEPATH || GATEPATH=/net/onnv.eng/export/gate |
|
59 |
fi |
|
60 |
if [ -z "$ARCHIVEPATH" ]; then |
|
61 |
ARCHIVEPATH=/ws/onnv-gate |
|
62 |
test -d $ARCHIVEPATH || ARCHIVEPATH=/net/onnv.eng/export |
|
63 |
fi |
|
64 |
export GATE=${GATEPATH} |
|
65 |
export ARCHIVE=${ARCHIVEPATH} |
|
66 |
||
67 |
# |
|
68 |
# NOTE: Entries in *_files must expand to either the exact files required, |
|
69 |
# or to directories that will be scoured for files. Any directories |
|
70 |
# (and subdirectories) resulting from a wildcard expansion will be |
|
71 |
# fully recursed by BFU's searching for files. (E.g. /etc/inet/* will |
|
72 |
# include all files in any of its directories, as well as any files in |
|
73 |
# /etc/inet/ itself. |
|
74 |
# |
|
1872 | 75 |
# These lists should really be generated automatically from the |
76 |
# pkgmap(4) metadata. |
|
77 |
# |
|
78 |
||
79 |
# |
|
0 | 80 |
# First list: files to be saved in global and non-global zones. |
81 |
# |
|
82 |
all_zones_files=" |
|
83 |
etc/.login |
|
84 |
etc/acct/holidays |
|
85 |
etc/acctadm.conf |
|
86 |
etc/auto_* |
|
87 |
etc/cron.d/at.deny |
|
88 |
etc/cron.d/cron.deny |
|
89 |
etc/crypto/pkcs11.conf |
|
90 |
etc/default/* |
|
91 |
etc/dfs/dfstab |
|
92 |
etc/dumpdates |
|
93 |
etc/ftpd/* |
|
94 |
etc/ftpusers |
|
95 |
etc/group |
|
96 |
etc/gss/gsscred.conf |
|
97 |
etc/gss/mech |
|
98 |
etc/gss/qop |
|
99 |
etc/inet/* |
|
100 |
etc/init.d/* |
|
101 |
etc/inittab |
|
3448 | 102 |
etc/ipf/ipf.conf |
103 |
etc/iu.ap |
|
0 | 104 |
etc/krb5/kadm5.acl |
105 |
etc/krb5/kdc.conf |
|
106 |
etc/krb5/kpropd.acl |
|
107 |
etc/krb5/krb5.conf |
|
108 |
etc/krb5/warn.conf |
|
109 |
etc/logadm.conf |
|
110 |
etc/logindevperm |
|
111 |
etc/lp/Systems |
|
112 |
etc/mail/*.cf |
|
113 |
etc/mail/*.hf |
|
114 |
etc/mail/*.rc |
|
115 |
etc/mail/aliases |
|
116 |
etc/mail/helpfile |
|
117 |
etc/mail/local-host-names |
|
118 |
etc/mail/trusted-users |
|
1872 | 119 |
etc/named.conf |
0 | 120 |
etc/net/*/services |
121 |
etc/netconfig |
|
122 |
etc/nfs/nfslog.conf |
|
123 |
etc/nfssec.conf |
|
124 |
etc/nscd.conf |
|
125 |
etc/nsswitch.* |
|
126 |
etc/pam.conf |
|
127 |
etc/passwd |
|
128 |
etc/policy.conf |
|
129 |
etc/printers.conf |
|
130 |
etc/profile |
|
131 |
etc/project |
|
132 |
etc/publickey |
|
133 |
etc/remote |
|
134 |
etc/resolv.conf |
|
135 |
etc/rmmount.conf |
|
136 |
etc/rpc |
|
137 |
etc/rpld.conf |
|
138 |
etc/saf/_sactab |
|
139 |
etc/saf/_sysconfig |
|
140 |
etc/saf/zsmon/_pmtab |
|
2364 | 141 |
etc/security/audit_class |
142 |
etc/security/audit_control |
|
143 |
etc/security/audit_event |
|
144 |
etc/security/audit_startup |
|
145 |
etc/security/audit_user |
|
146 |
etc/security/audit_warn |
|
147 |
etc/security/auth_attr |
|
0 | 148 |
etc/security/crypt.conf |
2364 | 149 |
etc/security/exec_attr |
0 | 150 |
etc/security/policy.conf |
2364 | 151 |
etc/security/prof_attr |
0 | 152 |
etc/sfw/openssl/openssl.cnf |
153 |
etc/shadow |
|
154 |
etc/skel/.profile |
|
155 |
etc/skel/local.* |
|
156 |
etc/smartcard/.keys |
|
157 |
etc/smartcard/desktop.properties |
|
158 |
etc/smartcard/ocf.classpath |
|
159 |
etc/smartcard/opencard.properties |
|
160 |
etc/ssh/ssh_config |
|
161 |
etc/ssh/sshd_config |
|
162 |
etc/syslog.conf |
|
163 |
etc/ttydefs |
|
164 |
etc/ttysrch |
|
165 |
etc/user_attr |
|
166 |
etc/uucp/[A-Z]* |
|
167 |
etc/vfstab |
|
168 |
var/spool/cron/crontabs/* |
|
169 |
var/yp/Makefile |
|
170 |
var/yp/aliases |
|
171 |
var/yp/nicknames |
|
172 |
" |
|
173 |
||
174 |
# |
|
175 |
# Second list: files to be saved in the global zone only. |
|
176 |
# |
|
177 |
global_zone_only_files=" |
|
178 |
boot/grub/menu.lst |
|
179 |
boot/solaris/bootenv.rc |
|
180 |
boot/solaris/devicedb/master |
|
181 |
boot/solaris/filelist.ramdisk |
|
1872 | 182 |
etc/aggregation.conf |
3201 | 183 |
etc/dladm/* |
0 | 184 |
etc/bootrc |
185 |
etc/crypto/kcf.conf |
|
1872 | 186 |
etc/datalink.conf |
0 | 187 |
etc/devlink.tab |
188 |
etc/driver_aliases |
|
189 |
etc/driver_classes |
|
190 |
etc/lvm/devpath |
|
191 |
etc/lvm/lock |
|
192 |
etc/lvm/md.cf |
|
193 |
etc/lvm/md.ctlrmap |
|
194 |
etc/lvm/md.tab |
|
195 |
etc/lvm/mddb.cf |
|
196 |
etc/lvm/runtime.cf |
|
197 |
etc/mach |
|
198 |
etc/minor_perm |
|
199 |
etc/name_to_major |
|
200 |
etc/name_to_sysnum |
|
1872 | 201 |
etc/nca/nca.if |
202 |
etc/nca/ncakmod.conf |
|
203 |
etc/nca/ncalogd.conf |
|
204 |
etc/nca/ncaport.conf |
|
0 | 205 |
etc/openwin/server/etc/OWconfig |
206 |
etc/path_to_inst |
|
207 |
etc/power.conf |
|
208 |
etc/ppp/chap-secrets |
|
209 |
etc/ppp/options |
|
210 |
etc/ppp/pap-secrets |
|
211 |
etc/security/device_policy |
|
212 |
etc/security/extra_privs |
|
213 |
etc/system |
|
214 |
etc/zones/index |
|
215 |
kernel/drv/elxl.conf |
|
216 |
kernel/drv/md.conf |
|
217 |
kernel/drv/options.conf |
|
218 |
kernel/drv/ra.conf |
|
219 |
kernel/drv/scsa2usb.conf |
|
220 |
kernel/drv/scsi_vhci.conf |
|
221 |
kernel/drv/sd.conf |
|
222 |
platform/*/kernel/drv/*ppm.conf |
|
223 |
platform/i86pc/kernel/drv/aha.conf |
|
224 |
platform/i86pc/kernel/drv/asy.conf |
|
225 |
platform/sun4u/boot.conf |
|
226 |
" |
|
227 |
||
228 |
# |
|
229 |
# Third list: files extracted from generic.root but which belong in the global |
|
3948
b8d304c37bf9
6535942 bfu and acr don't tolerate non-native zones other than 'lx'
dp
parents:
3893
diff
changeset
|
230 |
# zone only: they are superfluous (and some even harmful) in nonglobal zones. |
0 | 231 |
# |
232 |
# (note: as /etc/init.d scripts are converted to smf(5) "Greenline" services, |
|
233 |
# they (and their /etc/rc?.d hardlinks) should be removed from this list when |
|
234 |
# they are added to smf_obsolete_rc_files, below) |
|
235 |
# |
|
3948
b8d304c37bf9
6535942 bfu and acr don't tolerate non-native zones other than 'lx'
dp
parents:
3893
diff
changeset
|
236 |
superfluous_nonglobal_zone_files=" |
0 | 237 |
dev/dsk |
238 |
dev/fd |
|
239 |
dev/pts |
|
240 |
dev/rdsk |
|
241 |
dev/rmt |
|
242 |
dev/stderr |
|
243 |
dev/stdin |
|
244 |
dev/stdout |
|
245 |
dev/swap |
|
246 |
dev/term |
|
247 |
devices |
|
248 |
etc/dacf.conf |
|
249 |
etc/dat |
|
250 |
etc/default/metassist.xml |
|
251 |
etc/default/power |
|
252 |
etc/flash/postdeployment/svm.cleanup |
|
253 |
etc/flash/predeployment/svm.save |
|
254 |
etc/inet/ipqosconf.1.sample |
|
255 |
etc/inet/ipqosconf.2.sample |
|
256 |
etc/inet/ipqosconf.3.sample |
|
257 |
etc/inet/sock2path |
|
258 |
etc/init.d/devlinks |
|
259 |
etc/init.d/dodatadm.udaplt |
|
260 |
etc/init.d/drvconfig |
|
261 |
etc/init.d/llc2 |
|
262 |
etc/init.d/ncakmod |
|
263 |
etc/init.d/ncalogd |
|
264 |
etc/init.d/pcmcia |
|
265 |
etc/init.d/pppd |
|
266 |
etc/init.d/wrsmcfg |
|
267 |
etc/llc2 |
|
268 |
etc/lvm |
|
269 |
etc/nca |
|
270 |
etc/openwin |
|
271 |
etc/ppp |
|
272 |
etc/rc0.d/K34ncalogd |
|
273 |
etc/rc0.d/K50pppd |
|
274 |
etc/rc0.d/K52llc2 |
|
275 |
etc/rc1.d/K34ncalogd |
|
276 |
etc/rc1.d/K50pppd |
|
277 |
etc/rc1.d/K52llc2 |
|
278 |
etc/rc2.d/S40llc2 |
|
279 |
etc/rc2.d/S42ncakmod |
|
280 |
etc/rc2.d/S47pppd |
|
281 |
etc/rc2.d/S81dodatadm.udaplt |
|
282 |
etc/rc2.d/S94ncalogd |
|
283 |
etc/rcS.d/K34ncalogd |
|
284 |
etc/rcS.d/K44wrsmcfg |
|
285 |
etc/rcS.d/K50pppd |
|
286 |
etc/rcS.d/K52llc2 |
|
287 |
etc/rcS.d/S29wrsmcfg |
|
288 |
etc/rcm |
|
289 |
etc/sock2path |
|
290 |
etc/usb |
|
291 |
etc/wrsm |
|
292 |
etc/zones |
|
293 |
kernel |
|
1872 | 294 |
lib/libmeta.so |
295 |
lib/libmeta.so.1 |
|
296 |
lib/svc/method/sf880dr |
|
297 |
lib/svc/method/svc-cvcd |
|
298 |
lib/svc/method/svc-dcs |
|
2309
a4369449abc5
6425012 LDoms CPU DR should be enhanced to interact with RCM
rsmaeda
parents:
2239
diff
changeset
|
299 |
lib/svc/method/svc-drd |
1872 | 300 |
lib/svc/method/svc-dscp |
301 |
lib/svc/method/svc-dumpadm |
|
172
3f157d3c7622
PSARC/2004/199 intrd: Dynamic Interrupt Distribution
esolom
parents:
132
diff
changeset
|
302 |
lib/svc/method/svc-intrd |
2912
85ea316d9c18
PSARC 2005/399 Tamarack: Removable Media Enhancements in Solaris
artem
parents:
2866
diff
changeset
|
303 |
lib/svc/method/svc-hal |
1872 | 304 |
lib/svc/method/svc-mdmonitor |
305 |
lib/svc/method/svc-metainit |
|
2239
ae485ed05e17
6440631 superfluous_local_zone_files needs an update
comay
parents:
2158
diff
changeset
|
306 |
lib/svc/method/svc-metasync |
ae485ed05e17
6440631 superfluous_local_zone_files needs an update
comay
parents:
2158
diff
changeset
|
307 |
lib/svc/method/svc-oplhpd |
1069
85bcc1f0665c
6359638 Remove pools clutter from the bfu archives
garypen
parents:
1011
diff
changeset
|
308 |
lib/svc/method/svc-poold |
85bcc1f0665c
6359638 Remove pools clutter from the bfu archives
garypen
parents:
1011
diff
changeset
|
309 |
lib/svc/method/svc-pools |
1872 | 310 |
lib/svc/method/svc-power |
3247 | 311 |
lib/svc/method/svc-resource-mgmt |
2912
85ea316d9c18
PSARC 2005/399 Tamarack: Removable Media Enhancements in Solaris
artem
parents:
2866
diff
changeset
|
312 |
lib/svc/method/svc-rmvolmgr |
953 | 313 |
lib/svc/method/svc-scheduler |
1872 | 314 |
lib/svc/method/svc-sckmd |
315 |
lib/svc/method/svc-syseventd |
|
1991 | 316 |
lib/svc/method/svc-vntsd |
1872 | 317 |
lib/svc/method/svc-zones |
318 |
platform/*/kernel |
|
319 |
platform/SUNW,Sun-Fire-15000/lib/cvcd |
|
320 |
platform/SUNW,Ultra-Enterprise-10000/lib/cvcd |
|
321 |
platform/i86pc/biosint |
|
322 |
platform/i86pc/multiboot |
|
323 |
platform/sun4u/cprboot |
|
324 |
platform/sun4u/lib/libwrsmconf.so |
|
325 |
platform/sun4u/lib/libwrsmconf.so.1 |
|
326 |
platform/sun4u/lib/sparcv9/libwrsmconf.so |
|
327 |
platform/sun4u/lib/sparcv9/libwrsmconf.so.1 |
|
328 |
platform/sun4u/sbin |
|
329 |
platform/sun4u/ufsboot |
|
330 |
platform/sun4u/wanboot |
|
331 |
platform/sun4v/ufsboot |
|
332 |
platform/sun4v/wanboot |
|
333 |
sbin/metadb |
|
334 |
sbin/metadevadm |
|
335 |
sbin/metainit |
|
336 |
sbin/metarecover |
|
337 |
sbin/metastat |
|
338 |
usr/include/sys/dcam |
|
339 |
usr/lib/devfsadm/linkmod/SUNW_dcam1394_link.so |
|
1991 | 340 |
usr/lib/ldoms |
1872 | 341 |
usr/platform/SUNW,SPARC-Enterprise/lib/dscp.ppp.options |
342 |
usr/platform/SUNW,SPARC-Enterprise/lib/libdscp.so |
|
343 |
usr/platform/SUNW,SPARC-Enterprise/lib/libdscp.so.1 |
|
344 |
usr/platform/SUNW,SPARC-Enterprise/lib/llib-ldscp.ln |
|
345 |
usr/platform/SUNW,SPARC-Enterprise/sbin/prtdscp |
|
0 | 346 |
var/adm/pool |
347 |
var/log/pool |
|
1872 | 348 |
var/svc/manifest/network/rpc/mdcomm.xml |
349 |
var/svc/manifest/network/rpc/meta.xml |
|
350 |
var/svc/manifest/network/rpc/metamed.xml |
|
351 |
var/svc/manifest/network/rpc/metamh.xml |
|
352 |
var/svc/manifest/platform/i86pc/eeprom.xml |
|
353 |
var/svc/manifest/platform/sun4u/dcs.xml |
|
354 |
var/svc/manifest/platform/sun4u/dscp.xml |
|
355 |
var/svc/manifest/platform/sun4u/efdaemon.xml |
|
2239
ae485ed05e17
6440631 superfluous_local_zone_files needs an update
comay
parents:
2158
diff
changeset
|
356 |
var/svc/manifest/platform/sun4u/oplhpd.xml |
1872 | 357 |
var/svc/manifest/platform/sun4u/sckmd.xml |
358 |
var/svc/manifest/platform/sun4u/sf880drd.xml |
|
2239
ae485ed05e17
6440631 superfluous_local_zone_files needs an update
comay
parents:
2158
diff
changeset
|
359 |
var/svc/manifest/platform/sun4v |
0 | 360 |
var/svc/manifest/system/cvc.xml |
361 |
var/svc/manifest/system/dumpadm.xml |
|
362 |
var/svc/manifest/system/fmd.xml |
|
2912
85ea316d9c18
PSARC 2005/399 Tamarack: Removable Media Enhancements in Solaris
artem
parents:
2866
diff
changeset
|
363 |
var/svc/manifest/system/hal.xml |
172
3f157d3c7622
PSARC/2004/199 intrd: Dynamic Interrupt Distribution
esolom
parents:
132
diff
changeset
|
364 |
var/svc/manifest/system/intrd.xml |
0 | 365 |
var/svc/manifest/system/mdmonitor.xml |
366 |
var/svc/manifest/system/metainit.xml |
|
2239
ae485ed05e17
6440631 superfluous_local_zone_files needs an update
comay
parents:
2158
diff
changeset
|
367 |
var/svc/manifest/system/metasync.xml |
0 | 368 |
var/svc/manifest/system/picl.xml |
1069
85bcc1f0665c
6359638 Remove pools clutter from the bfu archives
garypen
parents:
1011
diff
changeset
|
369 |
var/svc/manifest/system/poold.xml |
85bcc1f0665c
6359638 Remove pools clutter from the bfu archives
garypen
parents:
1011
diff
changeset
|
370 |
var/svc/manifest/system/pools.xml |
0 | 371 |
var/svc/manifest/system/power.xml |
3247 | 372 |
var/svc/manifest/system/resource-mgmt.xml |
953 | 373 |
var/svc/manifest/system/scheduler.xml |
0 | 374 |
var/svc/manifest/system/sysevent.xml |
375 |
var/svc/manifest/system/zones.xml |
|
2912
85ea316d9c18
PSARC 2005/399 Tamarack: Removable Media Enhancements in Solaris
artem
parents:
2866
diff
changeset
|
376 |
var/svc/manifest/system/filesystem/rmvolmgr.xml |
0 | 377 |
" |
378 |
||
379 |
# |
|
1872 | 380 |
# Fourth list: files to be preserved, ie unconditionally restored to |
381 |
# "child" versions |
|
0 | 382 |
# |
383 |
preserve_files=" |
|
222 | 384 |
kernel/misc/amd64/sysinit |
1872 | 385 |
kernel/misc/amd64/usbs49_fw |
386 |
kernel/misc/sparcv9/usbs49_fw |
|
0 | 387 |
kernel/misc/sysinit |
1197
ef99698eed22
6367872 usbs49_fw module should not be replaced when upgrading system.
yz147069
parents:
1177
diff
changeset
|
388 |
kernel/misc/usbs49_fw |
0 | 389 |
var/adm/aculog |
390 |
var/adm/spellhist |
|
391 |
var/adm/utmpx |
|
392 |
var/adm/wtmpx |
|
393 |
var/log/authlog |
|
394 |
var/log/syslog |
|
395 |
var/saf/zsmon/log |
|
396 |
" |
|
397 |
||
398 |
realmode_files=" |
|
399 |
boot/solaris/bootenv.rc |
|
400 |
boot/solaris/devicedb/master |
|
401 |
" |
|
402 |
||
403 |
fail() { |
|
404 |
print "$*" >& 2 |
|
405 |
print "bfu aborting" >& 2 |
|
3948
b8d304c37bf9
6535942 bfu and acr don't tolerate non-native zones other than 'lx'
dp
parents:
3893
diff
changeset
|
406 |
rm -f "$bfu_zone_list" |
0 | 407 |
exit 1 |
408 |
} |
|
409 |
||
410 |
filelist() { |
|
411 |
files="$all_zones_files $preserve_files" |
|
412 |
if [ $1 = "global" ]; then |
|
413 |
files="$global_zone_only_files $files" |
|
414 |
fi |
|
415 |
find $files -depth -type f ! -name core -print 2>/dev/null | sort -u || { |
|
416 |
# |
|
417 |
# Force cpio to return non-zero by printing an error message |
|
418 |
# to stdout that it won't be able to lstat(). |
|
419 |
# |
|
420 |
echo 'filelist: sort failed' |
|
421 |
fail "sort failed" |
|
422 |
} |
|
423 |
} |
|
424 |
||
425 |
realmode_filelist() { |
|
426 |
find $realmode_files -depth -type f ! -name core -print 2>/dev/null | sort |
|
427 |
} |
|
428 |
||
429 |
smf_inetd_conversions=" |
|
430 |
100134 |
|
431 |
100150 |
|
432 |
100155 |
|
433 |
100229 |
|
434 |
100230 |
|
435 |
100234 |
|
436 |
100242 |
|
437 |
100422 |
|
438 |
chargen |
|
439 |
comsat |
|
440 |
daytime |
|
441 |
discard |
|
442 |
echo |
|
443 |
eklogin |
|
444 |
exec |
|
445 |
finger |
|
446 |
ftp |
|
447 |
gssd |
|
448 |
klogin |
|
449 |
krb5_prop |
|
450 |
kshell |
|
451 |
ktkt_warnd |
|
452 |
login |
|
453 |
metad |
|
454 |
metamedd |
|
455 |
metamhd |
|
456 |
name |
|
457 |
ocfserv |
|
458 |
printer |
|
459 |
rexd |
|
460 |
rquotad |
|
461 |
rstatd |
|
462 |
rusersd |
|
463 |
shell |
|
464 |
smserverd |
|
465 |
sprayd |
|
466 |
sun-dr |
|
467 |
talk |
|
468 |
telnet |
|
469 |
time |
|
470 |
uucp |
|
471 |
walld |
|
472 |
" |
|
473 |
||
305 | 474 |
enable_next_boot () { |
475 |
if [ -x /tmp/bfubin/svccfg ]; then |
|
476 |
svcadm disable -t $1 |
|
477 |
[ $? = 0 ] || echo "warning: unable to temporarily disable $1" |
|
478 |
svccfg -s $1 setprop general/enabled = true |
|
479 |
[ $? = 0 ] || echo "warning: unable to enable $1 for next boot" |
|
480 |
fi |
|
481 |
} |
|
482 |
||
0 | 483 |
smf_inetd_disable() { |
484 |
inetconf=$rootprefix/etc/inet/inetd.conf |
|
485 |
inettmp=/tmp/inetd.tmp.$$ |
|
486 |
||
487 |
sed "$(for i in $smf_inetd_conversions; do |
|
488 |
echo "s:^[ ]*$i[ /]:#SMFbfu# &:" |
|
489 |
done)" $inetconf > $inettmp && ! cmp -s $inettmp $inetconf && |
|
490 |
cp $inettmp $inetconf |
|
491 |
||
492 |
rm -f -- $inettmp |
|
493 |
} |
|
494 |
||
495 |
smf_inetd_reenable() { |
|
496 |
inetconf=$rootprefix/etc/inet/inetd.conf |
|
497 |
inettmp=/tmp/inetd.tmp.$$ |
|
498 |
||
499 |
sed 's/^#SMFbfu# //' $inetconf > $inettmp && cp $inettmp $inetconf |
|
500 |
||
501 |
rm -f -- $inettmp |
|
502 |
} |
|
503 |
||
504 |
smf_tftp_reinstall() { |
|
505 |
inetconf=$rootprefix/etc/inet/inetd.conf |
|
506 |
inettmp=/tmp/inetd.tmp.$$ |
|
507 |
||
508 |
if grep '^#SMFbfu# tftp' $inetconf >/dev/null ; then |
|
509 |
# BFU previously commented out, put it back in place |
|
510 |
sed 's/^#SMFbfu# tftp/tftp/' $inetconf > $inettmp && |
|
511 |
cp $inettmp $inetconf |
|
512 |
elif ! grep '^[# ]*tftp' $inetconf >/dev/null; then |
|
513 |
# No entry, append to end |
|
514 |
cat >>$inetconf <<EOF |
|
515 |
# TFTPD - tftp server (primarily used for booting) |
|
516 |
#tftp dgram udp6 wait root /usr/sbin/in.tftpd in.tftpd -s /tftpboot |
|
517 |
EOF |
|
518 |
fi |
|
519 |
||
520 |
rm -f -- $inettmp |
|
521 |
} |
|
522 |
||
523 |
inetd_conf_svm_hack() { |
|
524 |
# Since inetd.conf is updated by SUNWmdr's postinstall script, |
|
525 |
# we will update the actual inetd.conf here to reflect the postinstall |
|
526 |
# changes. |
|
527 |
||
528 |
inetconf=$rootprefix/etc/inet/inetd.conf |
|
529 |
inettmp=/tmp/inetd.tmp.$$ |
|
530 |
inetnew=/tmp/inetd.new.$$ |
|
531 |
||
532 |
# |
|
533 |
# only change inetd.conf if the rpc.metad entry is out of date |
|
534 |
# |
|
535 |
||
536 |
if ! grep "^[# ]*100229/1-2" $inetconf > /dev/null ; then |
|
537 |
||
538 |
# Grab existing rpc entries for rpc.metad |
|
539 |
# and convert spaces to tabs within the rpc entry, as well as |
|
540 |
# the transport method; |
|
541 |
# or add a new entry in case there was none. |
|
542 |
if grep "^[# ]*100229/1" $inetconf > /dev/null ; then |
|
543 |
grep "^# METAD - SLVM metadb" $inetconf > $inettmp |
|
544 |
grep "^[# ]*100229/1" $inetconf | \ |
|
545 |
sed -e 's/[ ][ ]*/ /g' \ |
|
546 |
-e 's?100229/1?100229/1-2?' >> $inettmp |
|
547 |
else |
|
548 |
echo '# METAD - SVM metadb Daemon' > $inettmp |
|
549 |
echo "100229/1-2\ttli\trpc/tcp\twait\troot\t/usr/sbin/rpc.metad\trpc.metad" >> $inettmp |
|
550 |
fi |
|
551 |
||
552 |
grep -v '^# METAD - SLVM metadb' $inetconf | \ |
|
553 |
grep -v '^[# ]*100229/1' > $inetnew |
|
554 |
cat $inettmp >> $inetnew |
|
555 |
||
556 |
if ! diff $inetnew $inetconf > /dev/null ; then |
|
557 |
print "Updating inet.conf metad entry ... \c" |
|
558 |
if cp $inetnew $inetconf ; then |
|
559 |
print "done." |
|
560 |
else |
|
561 |
print "failed." |
|
562 |
fi |
|
563 |
fi |
|
564 |
rm -f $inettmp $inetnew |
|
565 |
fi |
|
566 |
||
567 |
# |
|
568 |
# only change inetd.conf if the rpc.mdcommd entry is out of date |
|
569 |
# |
|
570 |
||
571 |
if ! grep "^[# ]*100422/1" $inetconf > /dev/null ; then |
|
572 |
||
573 |
# Grab existing rpc entries for rpc.mdcommd |
|
574 |
# and convert spaces to tabs within the rpc entry, |
|
575 |
# or add a new entry in case there was none. |
|
576 |
if grep "^[# ]*100422/1" $inetconf > /dev/null ; then |
|
577 |
grep "^# MDMN_COMMD - SVM Multi node" $inetconf > $inettmp |
|
578 |
grep "^[# ]*100422/1" $inetconf | \ |
|
579 |
sed -e 's/[ ][ ]*/ /g' >> $inettmp |
|
580 |
else |
|
581 |
echo '# MDMN_COMMD - SVM Multi node communication daemon' >$inettmp |
|
582 |
echo '100422/1\ttli\trpc/tcp\twait\troot\t/usr/sbin/rpc.mdcommd\trpc.mdcommd' >> $inettmp |
|
583 |
fi |
|
584 |
||
585 |
grep -v '^# MDMN_COMMD - SVM Multi node' $inetconf | \ |
|
586 |
grep -v '^[# ]*100422/1' > $inetnew |
|
587 |
cat $inettmp >> $inetnew |
|
588 |
||
589 |
if ! diff $inetnew $inetconf > /dev/null ; then |
|
590 |
print "Updating inetd.conf rpc.mdcommd entry ... \c" |
|
591 |
if cp $inetnew $inetconf; then |
|
592 |
print "done." |
|
593 |
else |
|
594 |
print "failed." |
|
595 |
fi |
|
596 |
fi |
|
597 |
||
598 |
rm -f $inettmp $inetnew |
|
599 |
fi |
|
600 |
} |
|
601 |
||
602 |
update_policy_conf() { |
|
603 |
# update /etc/security/policy.conf with the default |
|
604 |
# Solaris crypt(3c) policy. |
|
605 |
||
606 |
dest=$rootprefix/etc/security/policy.conf |
|
607 |
||
608 |
grep 'CRYPT_' $dest > /dev/null 2>&1 |
|
609 |
if [ $? = 1 ] ; then |
|
610 |
print "Updating entries for crypt(3c), see policy.conf(4)" |
|
611 |
cat >> $dest <<EOM |
|
612 |
||
613 |
# crypt(3c) Algorithms Configuration |
|
614 |
# |
|
615 |
# CRYPT_ALGORITHMS_ALLOW specifies the algorithms that are allowed to |
|
616 |
# be used for new passwords. This is enforced only in crypt_gensalt(3c). |
|
617 |
# |
|
618 |
CRYPT_ALGORITHMS_ALLOW=1,2a,md5 |
|
619 |
||
620 |
# To deprecate use of the traditional unix algorithm, uncomment below |
|
621 |
# and change CRYPT_DEFAULT= to another algorithm. For example, |
|
622 |
# CRYPT_DEFAULT=1 for BSD/Linux MD5. |
|
623 |
# |
|
624 |
#CRYPT_ALGORITHMS_DEPRECATE=__unix__ |
|
625 |
||
626 |
# The Solaris default is the traditional UNIX algorithm. This is not |
|
627 |
# listed in crypt.conf(4) since it is internal to libc. The reserved |
|
628 |
# name __unix__ is used to refer to it. |
|
629 |
# |
|
630 |
CRYPT_DEFAULT=__unix__ |
|
631 |
EOM |
|
632 |
fi |
|
633 |
grep PRIV_ $dest >/dev/null 2>&1 |
|
634 |
if [ $? = 1 ]; then |
|
635 |
echo "Updating entries for privileges(5)," \ |
|
636 |
"see policy.conf(4) for details." |
|
637 |
cat >> $dest <<EOM |
|
638 |
# |
|
639 |
# These settings determine the default privileges users have. If not set, |
|
640 |
# the default privileges are taken from the inherited set. |
|
641 |
# There are two different settings; PRIV_DEFAULT determines the default |
|
642 |
# set on login; PRIV_LIMIT defines the Limit set on login. |
|
643 |
# Individual users can have privileges assigned or taken away through |
|
644 |
# user_attr. Privileges can also be assigned to profiles in which case |
|
645 |
# the users with those profiles can use those privileges through pfexec(1m). |
|
646 |
# For maximum future compatibility, the specifications should |
|
647 |
# always include "basic" or "all"; privileges should then be removed using |
|
648 |
# the negation. E.g., PRIV_LIMIT=all,!sys_linkdir takes away only the |
|
649 |
# sys_linkdir privilege, regardless of future additional privileges. |
|
650 |
# Similarly, PRIV_DEFAULT=basic,!file_link_any takes away only the |
|
651 |
# file_link_any privilege from the basic privilege set; only that notation |
|
652 |
# is immune from a future addition of currently unprivileged operations to |
|
653 |
# the basic privilege set. |
|
654 |
# NOTE: removing privileges from the the Limit set requires EXTREME care |
|
655 |
# as any set-uid root program may suddenly fail because it lacks certain |
|
656 |
# privilege(s). |
|
657 |
# |
|
658 |
#PRIV_DEFAULT=basic |
|
659 |
#PRIV_LIMIT=all |
|
660 |
EOM |
|
661 |
fi |
|
662 |
||
663 |
} |
|
664 |
||
665 |
# |
|
666 |
# Cleanup nfsmapid configuration before extracting |
|
667 |
# root bits. Remove if they exist: |
|
668 |
# nfsmapid entry in inetd.conf |
|
669 |
# nfsmapid entry in /etc/net/ti*/services |
|
670 |
# |
|
671 |
# Going forward neither should exist, but no harm if services entry exists |
|
672 |
# Going way backwards (pre-04/28/2004), inetd.conf must exist but will |
|
673 |
# be a conflict that should be merged in |
|
674 |
# |
|
675 |
nfsmapid_cfg() { |
|
676 |
inetdconf=$rootprefix/etc/inet/inetd.conf |
|
677 |
tmpinetcf=/tmp/inetd.conf.$$ |
|
678 |
cp -pf ${inetdconf} ${tmpinetcf} |
|
679 |
cat /dev/null > ${inetdconf} 2>&1 |
|
680 |
sed -e "/^#[# ]*NFSv4/d" \ |
|
681 |
-e "/^[# ]*100166\/1/d" \ |
|
682 |
${tmpinetcf} > ${inetdconf} 2>&1 |
|
683 |
rm -f ${tmpinetcf} |
|
684 |
||
685 |
tmpservices=/tmp/services.$$ |
|
686 |
||
687 |
services=$rootprefix/etc/net/ticotsord/services |
|
688 |
cp -pf ${services} ${tmpservices} |
|
689 |
cat /dev/null > ${services} 2>&1 |
|
690 |
sed -e "/^[# ]*nfsmapid/d" \ |
|
691 |
${tmpservices} > ${services} 2>&1 |
|
692 |
rm -f ${tmpservices} |
|
693 |
||
694 |
services=$rootprefix/etc/net/ticots/services |
|
695 |
cp -pf ${services} ${tmpservices} |
|
696 |
cat /dev/null > ${services} 2>&1 |
|
697 |
sed -e "/^[# ]*nfsmapid/d" \ |
|
698 |
${tmpservices} > ${services} 2>&1 |
|
699 |
rm -f ${tmpservices} |
|
700 |
||
701 |
services=$rootprefix/etc/net/ticlts/services |
|
702 |
cp -pf ${services} ${tmpservices} |
|
703 |
cat /dev/null > ${services} 2>&1 |
|
704 |
sed -e "/^[# ]*nfsmapid/d" \ |
|
705 |
${tmpservices} > ${services} 2>&1 |
|
706 |
rm -f ${tmpservices} |
|
707 |
} |
|
708 |
||
2315
9b2a16330ba6
6445209 snv_43 build servers fail to build ON (rpcbind should no longer include nfsauth_prot.h)
rmesta
parents:
2311
diff
changeset
|
709 |
# |
0 | 710 |
# Define global variables |
711 |
# |
|
712 |
CALL_DEVID_DESTROY="" |
|
713 |
# |
|
714 |
# List of SDS commands that must be deleted. |
|
715 |
# |
|
716 |
SDSCMDLIST=" |
|
717 |
growfs |
|
718 |
metaclear |
|
719 |
metadb |
|
720 |
metadetach |
|
721 |
metahs |
|
722 |
metainit |
|
723 |
metaoffline |
|
724 |
metaonline |
|
725 |
metaparam |
|
726 |
metarename |
|
727 |
metareplace |
|
728 |
metaroot |
|
729 |
metaset |
|
730 |
metastat |
|
731 |
metasync |
|
732 |
metattach |
|
733 |
rpc.metad |
|
734 |
rpc.metamhd |
|
735 |
" |
|
736 |
# |
|
737 |
# List of SDS configuration files that must be deleted. |
|
738 |
# |
|
739 |
SDSCONFIGLIST=" |
|
740 |
lock |
|
741 |
md.cf |
|
742 |
mddb.cf |
|
743 |
md.tab |
|
744 |
devpath |
|
745 |
md.ctlrmap |
|
746 |
" |
|
747 |
# |
|
748 |
# List of rc scripts that must be deleted. |
|
749 |
# |
|
750 |
RCLIST=" |
|
751 |
etc/init.d/SUNWmd.init |
|
752 |
etc/init.d/SUNWmd.sync |
|
753 |
etc/init.d/lvm.init |
|
754 |
etc/init.d/lvm.sync |
|
755 |
etc/rcS.d/S35SUNWmd.init |
|
756 |
etc/rcS.d/S35lvm.init |
|
757 |
etc/rc2.d/S95SUNWmd.sync |
|
758 |
etc/rc2.d/S95lvm.sync |
|
759 |
etc/rcS.d/S35slvm.init |
|
760 |
etc/rc2.d/S95slvm.sync |
|
761 |
etc/init.d/slvm.init |
|
762 |
etc/init.d/slvm.sync |
|
763 |
etc/init.d/init.mdlogd |
|
764 |
etc/rc3.d/S25mdlogd |
|
765 |
" |
|
766 |
# |
|
767 |
# List of flashprom-related files that must be deleted. |
|
768 |
# |
|
769 |
FLASHPROMLIST=" |
|
770 |
etc/rc2.d/S75flashprom |
|
771 |
etc/init.d/flashprom |
|
772 |
usr/platform/SUNW,Ultra-2/lib/flash-update.sh |
|
773 |
usr/platform/SUNW,Ultra-4/lib/flash-update.sh |
|
774 |
usr/platform/SUNW,Ultra-Enterprise/lib/flash-update.sh |
|
775 |
usr/platform/sun4u/doc/flashupdate.txt |
|
776 |
usr/platform/sun4u/lib/flash-update.sh |
|
777 |
usr/platform/sun4u/lib/prom/SUNW,Ultra-2 |
|
778 |
usr/platform/sun4u/lib/prom/SUNW,Ultra-4 |
|
779 |
usr/platform/sun4u/lib/prom/SUNW,Ultra-Enterprise |
|
780 |
" |
|
781 |
||
782 |
# |
|
783 |
# delete the entries associated with bootlist from /etc/system |
|
784 |
# |
|
785 |
||
786 |
delete_system_bootlist() { |
|
787 |
sed -e /"Begin MDD database info"/,/"End MDD database info"/d \ |
|
788 |
< ${SYSTEM_FILE} > /tmp/system.$$ |
|
789 |
cp /tmp/system.$$ ${SYSTEM_FILE} || \ |
|
790 |
echo "copy error: /tmp/system.$$ to ${SYSTEM_FILE}" |
|
791 |
} |
|
792 |
||
793 |
# |
|
794 |
# Add entries in md.conf for bootlist |
|
795 |
# |
|
796 |
||
797 |
fix_mdconf() { |
|
798 |
cp ${mdconf} /tmp/md.conf.$$ |
|
799 |
echo >> /tmp/md.conf.$$ |
|
800 |
echo "# Begin MDD database info (do not edit)" >> /tmp/md.conf.$$ |
|
801 |
sed -e 's/^set md://' -e 's/$/;/' ${SYSTEM_FILE} | \ |
|
802 |
grep mddb_bootlist >> /tmp/md.conf.$$ |
|
803 |
echo "# End MDD database info (do not edit)" >> /tmp/md.conf.$$ |
|
804 |
cp /tmp/md.conf.$$ ${mdconf} || \ |
|
805 |
echo "copy error: /tmp/md.conf.$$ to ${mdconf}" |
|
806 |
} |
|
807 |
||
808 |
# |
|
809 |
# add_devid_destroy(filename) |
|
810 |
# returns contents in filename |
|
811 |
# md_devid_destroy property is required when upgrading |
|
812 |
# from pre SVM to SVM releases or when the device ID returned from |
|
813 |
# the driver changes. |
|
814 |
# It is specifically placed between |
|
815 |
# # Begin MDD database info and # End MDD database info because |
|
816 |
# on the subsequent reboot, this line will be removed automatically when |
|
817 |
# metadevadm is run in rc2.d. |
|
818 |
# |
|
819 |
add_devid_destroy() { |
|
820 |
cat $1 | awk '{ |
|
821 |
if ( $2 == "End" && $4 == "database") { |
|
822 |
print "md_devid_destroy=1;" |
|
823 |
} |
|
824 |
print $0 |
|
825 |
}' >> /tmp/t$$ |
|
826 |
mv /tmp/t$$ $1 |
|
827 |
} |
|
828 |
||
829 |
# |
|
830 |
# smf(5) "Greenline" doesn't install the init.d or rc*.d scripts for |
|
831 |
# converted services. Clean up previous scripts for such services. |
|
832 |
# |
|
833 |
smf_obsolete_rc_files=" |
|
834 |
etc/init.d/ANNOUNCE |
|
835 |
etc/init.d/MOUNTFSYS |
|
836 |
etc/init.d/RMTMPFILES |
|
837 |
etc/init.d/audit |
|
838 |
etc/init.d/autofs |
|
839 |
etc/init.d/coreadm |
|
840 |
etc/init.d/cron |
|
841 |
etc/init.d/cryptosvc |
|
842 |
etc/init.d/cvc |
|
843 |
etc/init.d/devfsadm |
|
844 |
etc/init.d/dhcp |
|
845 |
etc/init.d/dhcpagent |
|
846 |
etc/init.d/domainname |
|
847 |
etc/init.d/efcode |
|
848 |
etc/init.d/inetd |
|
849 |
etc/init.d/inetinit |
|
850 |
etc/init.d/inetsvc |
|
851 |
etc/init.d/initboot |
|
852 |
etc/init.d/ipfboot |
|
853 |
etc/init.d/kdc |
|
854 |
etc/init.d/kdc.master |
|
855 |
etc/init.d/keymap |
|
856 |
etc/init.d/ldap.client |
|
857 |
etc/init.d/libc.mount |
|
858 |
etc/init.d/network |
|
859 |
etc/init.d/nfs.client |
|
860 |
etc/init.d/nodename |
|
861 |
etc/init.d/nscd |
|
862 |
etc/init.d/perf |
|
863 |
etc/init.d/picld |
|
864 |
etc/init.d/power |
|
865 |
etc/init.d/rcapd |
|
866 |
etc/init.d/rootusr |
|
867 |
etc/init.d/rpc |
|
868 |
etc/init.d/savecore |
|
1872 | 869 |
etc/init.d/sckm |
0 | 870 |
etc/init.d/sf880dr |
871 |
etc/init.d/slpd |
|
872 |
etc/init.d/sshd |
|
873 |
etc/init.d/standardmounts |
|
874 |
etc/init.d/svm.init |
|
875 |
etc/init.d/svm.sync |
|
876 |
etc/init.d/sysid.net |
|
877 |
etc/init.d/sysid.sys |
|
878 |
etc/init.d/syslog |
|
879 |
etc/init.d/utmpd |
|
2912
85ea316d9c18
PSARC 2005/399 Tamarack: Removable Media Enhancements in Solaris
artem
parents:
2866
diff
changeset
|
880 |
etc/init.d/volmgt |
0 | 881 |
etc/init.d/xntpd |
882 |
etc/init.d/zones |
|
883 |
etc/rc0.d/K00ANNOUNCE |
|
884 |
etc/rc0.d/K01zones |
|
885 |
etc/rc0.d/K03sshd |
|
196 | 886 |
etc/rc0.d/K05volmgt |
2118
b1619c8993f4
5004374 Ship with remote services disabled by default (fix build noise)
jjj
parents:
2117
diff
changeset
|
887 |
etc/rc0.d/K07snmpdx |
0 | 888 |
etc/rc0.d/K10rcapd |
889 |
etc/rc0.d/K21dhcp |
|
890 |
etc/rc0.d/K28kdc |
|
891 |
etc/rc0.d/K28kdc.master |
|
892 |
etc/rc0.d/K28nfs.server |
|
893 |
etc/rc0.d/K32cryptosvc |
|
894 |
etc/rc0.d/K33audit |
|
895 |
etc/rc0.d/K33efcode |
|
896 |
etc/rc0.d/K34svm.sync |
|
897 |
etc/rc0.d/K36sendmail |
|
898 |
etc/rc0.d/K36utmpd |
|
899 |
etc/rc0.d/K37power |
|
900 |
etc/rc0.d/K40cron |
|
901 |
etc/rc0.d/K40inetd |
|
902 |
etc/rc0.d/K40nscd |
|
903 |
etc/rc0.d/K40sf880dr |
|
904 |
etc/rc0.d/K40slpd |
|
905 |
etc/rc0.d/K40syslog |
|
906 |
etc/rc0.d/K40xntpd |
|
907 |
etc/rc0.d/K41autofs |
|
908 |
etc/rc0.d/K41ldap.client |
|
909 |
etc/rc0.d/K41nfs.client |
|
910 |
etc/rc0.d/K41rpc |
|
1872 | 911 |
etc/rc0.d/K42sckm |
0 | 912 |
etc/rc0.d/K43inet |
913 |
etc/rc0.d/K68picld |
|
914 |
etc/rc0.d/K83devfsadm |
|
915 |
etc/rc0.d/K90dhcpagent |
|
916 |
etc/rc1.d/K00ANNOUNCE |
|
917 |
etc/rc1.d/K01zones |
|
918 |
etc/rc1.d/K03sshd |
|
196 | 919 |
etc/rc1.d/K05volmgt |
2118
b1619c8993f4
5004374 Ship with remote services disabled by default (fix build noise)
jjj
parents:
2117
diff
changeset
|
920 |
etc/rc1.d/K07snmpdx |
0 | 921 |
etc/rc1.d/K10rcapd |
922 |
etc/rc1.d/K21dhcp |
|
923 |
etc/rc1.d/K28kdc |
|
924 |
etc/rc1.d/K28kdc.master |
|
925 |
etc/rc1.d/K28nfs.server |
|
926 |
etc/rc1.d/K33audit |
|
927 |
etc/rc1.d/K33efcode |
|
928 |
etc/rc1.d/K34svm.sync |
|
929 |
etc/rc1.d/K36sendmail |
|
930 |
etc/rc1.d/K36utmpd |
|
931 |
etc/rc1.d/K37power |
|
932 |
etc/rc1.d/K40cron |
|
933 |
etc/rc1.d/K40inetd |
|
934 |
etc/rc1.d/K40nscd |
|
935 |
etc/rc1.d/K40sf880dr |
|
936 |
etc/rc1.d/K40slpd |
|
937 |
etc/rc1.d/K40syslog |
|
938 |
etc/rc1.d/K40xntpd |
|
939 |
etc/rc1.d/K41autofs |
|
940 |
etc/rc1.d/K41ldap.client |
|
941 |
etc/rc1.d/K41rpc |
|
1872 | 942 |
etc/rc1.d/K42sckm |
0 | 943 |
etc/rc1.d/K43inet |
944 |
etc/rc1.d/K99libc.mount |
|
945 |
etc/rc1.d/S01MOUNTFSYS |
|
946 |
etc/rc2.d/K01zones |
|
947 |
etc/rc2.d/K03sshd |
|
196 | 948 |
etc/rc2.d/K05volmgt |
2118
b1619c8993f4
5004374 Ship with remote services disabled by default (fix build noise)
jjj
parents:
2117
diff
changeset
|
949 |
etc/rc2.d/K07snmpdx |
0 | 950 |
etc/rc2.d/K21dhcp |
951 |
etc/rc2.d/K28kdc |
|
952 |
etc/rc2.d/K28kdc.master |
|
953 |
etc/rc2.d/K28nfs.server |
|
954 |
etc/rc2.d/S01MOUNTFSYS |
|
955 |
etc/rc2.d/S05RMTMPFILES |
|
956 |
etc/rc2.d/S21perf |
|
957 |
etc/rc2.d/S30sysid.net |
|
958 |
etc/rc2.d/S65ipfboot |
|
959 |
etc/rc2.d/S69domainname |
|
960 |
etc/rc2.d/S69inet |
|
1872 | 961 |
etc/rc2.d/S70sckm |
0 | 962 |
etc/rc2.d/S71ldap.client |
963 |
etc/rc2.d/S71rpc |
|
964 |
etc/rc2.d/S71sysid.sys |
|
965 |
etc/rc2.d/S72inetsvc |
|
966 |
etc/rc2.d/S72slpd |
|
967 |
etc/rc2.d/S73nfs.client |
|
968 |
etc/rc2.d/S74autofs |
|
969 |
etc/rc2.d/S74syslog |
|
970 |
etc/rc2.d/S74xntpd |
|
971 |
etc/rc2.d/S75cron |
|
972 |
etc/rc2.d/S75savecore |
|
973 |
etc/rc2.d/S76nscd |
|
974 |
etc/rc2.d/S77inetd |
|
975 |
etc/rc2.d/S77sf880dr |
|
976 |
etc/rc2.d/S85power |
|
977 |
etc/rc2.d/S88sendmail |
|
978 |
etc/rc2.d/S88utmpd |
|
979 |
etc/rc2.d/S95svm.sync |
|
980 |
etc/rc2.d/S98efcode |
|
981 |
etc/rc2.d/S98libc.mount |
|
982 |
etc/rc2.d/S99audit |
|
983 |
etc/rc2.d/S99rcapd |
|
984 |
etc/rc3.d/S13kdc.master |
|
985 |
etc/rc3.d/S14kdc |
|
986 |
etc/rc3.d/S15nfs.server |
|
987 |
etc/rc3.d/S34dhcp |
|
2118
b1619c8993f4
5004374 Ship with remote services disabled by default (fix build noise)
jjj
parents:
2117
diff
changeset
|
988 |
etc/rc3.d/S76snmpdx |
196 | 989 |
etc/rc3.d/S81volmgt |
0 | 990 |
etc/rc3.d/S89sshd |
991 |
etc/rc3.d/S99zones |
|
992 |
etc/rcS.d/K01zones |
|
993 |
etc/rcS.d/K03sshd |
|
196 | 994 |
etc/rcS.d/K05volmgt |
2118
b1619c8993f4
5004374 Ship with remote services disabled by default (fix build noise)
jjj
parents:
2117
diff
changeset
|
995 |
etc/rcS.d/K07snmpdx |
0 | 996 |
etc/rcS.d/K10rcapd |
997 |
etc/rcS.d/K21dhcp |
|
998 |
etc/rcS.d/K28kdc |
|
999 |
etc/rcS.d/K28kdc.master |
|
1000 |
etc/rcS.d/K28nfs.server |
|
1001 |
etc/rcS.d/K33audit |
|
1002 |
etc/rcS.d/K33efcode |
|
1003 |
etc/rcS.d/K34svm.sync |
|
1004 |
etc/rcS.d/K36sendmail |
|
1005 |
etc/rcS.d/K36utmpd |
|
1006 |
etc/rcS.d/K37power |
|
1007 |
etc/rcS.d/K40cron |
|
1008 |
etc/rcS.d/K40inetd |
|
1009 |
etc/rcS.d/K40nscd |
|
1010 |
etc/rcS.d/K40sf880dr |
|
1011 |
etc/rcS.d/K40slpd |
|
1012 |
etc/rcS.d/K40syslog |
|
1013 |
etc/rcS.d/K40xntpd |
|
1014 |
etc/rcS.d/K41autofs |
|
1015 |
etc/rcS.d/K41ldap.client |
|
1016 |
etc/rcS.d/K41rpc |
|
1872 | 1017 |
etc/rcS.d/K42sckm |
0 | 1018 |
etc/rcS.d/K43inet |
1019 |
etc/rcS.d/K99libc.mount |
|
1020 |
etc/rcS.d/S10cvc |
|
1021 |
etc/rcS.d/S28network.sh |
|
1022 |
etc/rcS.d/S29nodename.sh |
|
1023 |
etc/rcS.d/S30rootusr.sh |
|
1024 |
etc/rcS.d/S33keymap.sh |
|
1025 |
etc/rcS.d/S35svm.init |
|
1026 |
etc/rcS.d/S40standardmounts.sh |
|
1027 |
etc/rcS.d/S42coreadm |
|
1028 |
etc/rcS.d/S45initboot |
|
1029 |
etc/rcS.d/S50devfsadm |
|
1030 |
etc/rcS.d/S72cryptosvc |
|
1031 |
etc/rcS.d/S95picld |
|
1032 |
" |
|
1033 |
||
1034 |
# Obsolete smf manifests |
|
1035 |
smf_obsolete_manifests=" |
|
3781 | 1036 |
var/svc/manifest/application/print/cleanup.xml |
0 | 1037 |
var/svc/manifest/network/tftp.xml |
1038 |
var/svc/manifest/network/lp.xml |
|
2912
85ea316d9c18
PSARC 2005/399 Tamarack: Removable Media Enhancements in Solaris
artem
parents:
2866
diff
changeset
|
1039 |
var/svc/manifest/system/filesystem/volfs.xml |
2958 | 1040 |
var/svc/manifest/network/pfil.xml |
3385 | 1041 |
var/svc/manifest/platform/sun4u/mpxio-upgrade.xml |
0 | 1042 |
" |
1043 |
||
1044 |
# smf services whose manifests have been renamed |
|
1045 |
smf_renamed_manifests=" |
|
1046 |
var/svc/manifest/milestone/name-service.xml |
|
25 | 1047 |
var/svc/manifest/system/filesystem/boot-archive.xml |
0 | 1048 |
" |
1049 |
||
1050 |
# Obsolete smf methods |
|
1051 |
smf_obsolete_methods=" |
|
3781 | 1052 |
lib/svc/method/print-cleanup |
0 | 1053 |
lib/svc/method/print-server |
2912
85ea316d9c18
PSARC 2005/399 Tamarack: Removable Media Enhancements in Solaris
artem
parents:
2866
diff
changeset
|
1054 |
lib/svc/method/svc-volfs |
2958 | 1055 |
lib/svc/method/pfil |
0 | 1056 |
" |
1057 |
||
1058 |
smf_cleanup () { |
|
1059 |
( |
|
1060 |
cd $root; |
|
1061 |
print "Removing obsolete rc.d scripts ... \c" |
|
1062 |
rm -f $smf_obsolete_rc_files |
|
1063 |
print "done." |
|
1064 |
) |
|
1065 |
} |
|
1066 |
||
1067 |
smf_new_profiles () { |
|
1068 |
[[ "$bfu_isa" = "sparc" ]] || return 0 |
|
1069 |
||
1070 |
[[ -x /tmp/bfubin/svccfg ]] || return 0 |
|
1071 |
||
1072 |
print "Clearing platform profile hash ..." |
|
1073 |
||
1074 |
# platform_SUNW,Sun-Fire.xml (and other new and |
|
1075 |
# corrected platforms) were delivered in Build 68. |
|
1076 |
if [ ! -f \ |
|
1077 |
$rootprefix/var/svc/profile/platform_SUNW,Sun-Fire.xml \ |
|
1078 |
]; then |
|
1079 |
for pfx in " " "v"; do |
|
1080 |
for plname in \ |
|
1081 |
none \ |
|
1082 |
SUNW_Sun_Fire_880 \ |
|
1083 |
SUNW_Sun_Fire_V890 \ |
|
1084 |
SUNW_Sun_Fire_15000 \ |
|
1085 |
SUNW_UltraEnterprise_10000; do |
|
1086 |
svccfg -f - <<EOF |
|
1087 |
select smf/manifest |
|
1088 |
delpg ${pfx}ar_svc_profile_platform_${plname}_xml |
|
1089 |
exit |
|
1090 |
EOF |
|
1091 |
done |
|
1092 |
done |
|
1093 |
fi |
|
1094 |
} |
|
1095 |
||
1096 |
smf_handle_new_services () { |
|
1097 |
# |
|
1098 |
# Detect, prior to extraction the arrival of new, |
|
1099 |
# default-enabled-in-profile services. If so, add a command |
|
1100 |
# such that they are enabled. |
|
1101 |
# |
|
1102 |
if [ ! -f $rootprefix/var/svc/profile/system/sac.xml ]; then |
|
1103 |
echo /usr/sbin/svcadm enable system/sac >> \ |
|
1104 |
$rootprefix/var/svc/profile/upgrade |
|
1105 |
fi |
|
172
3f157d3c7622
PSARC/2004/199 intrd: Dynamic Interrupt Distribution
esolom
parents:
132
diff
changeset
|
1106 |
if [[ $zone = global && |
3f157d3c7622
PSARC/2004/199 intrd: Dynamic Interrupt Distribution
esolom
parents:
132
diff
changeset
|
1107 |
! -f $rootprefix/var/svc/manifest/system/intrd.xml ]]; then |
3f157d3c7622
PSARC/2004/199 intrd: Dynamic Interrupt Distribution
esolom
parents:
132
diff
changeset
|
1108 |
echo /usr/sbin/svcadm enable system/intrd >> \ |
3f157d3c7622
PSARC/2004/199 intrd: Dynamic Interrupt Distribution
esolom
parents:
132
diff
changeset
|
1109 |
$rootprefix/var/svc/profile/upgrade |
3f157d3c7622
PSARC/2004/199 intrd: Dynamic Interrupt Distribution
esolom
parents:
132
diff
changeset
|
1110 |
fi |
196 | 1111 |
if [[ $zone = global && |
2912
85ea316d9c18
PSARC 2005/399 Tamarack: Removable Media Enhancements in Solaris
artem
parents:
2866
diff
changeset
|
1112 |
! -f $rootprefix/var/svc/manifest/system/scheduler.xml ]]; then |
85ea316d9c18
PSARC 2005/399 Tamarack: Removable Media Enhancements in Solaris
artem
parents:
2866
diff
changeset
|
1113 |
echo /usr/sbin/svcadm enable system/scheduler >> \ |
196 | 1114 |
$rootprefix/var/svc/profile/upgrade |
1115 |
fi |
|
953 | 1116 |
if [[ $zone = global && |
2912
85ea316d9c18
PSARC 2005/399 Tamarack: Removable Media Enhancements in Solaris
artem
parents:
2866
diff
changeset
|
1117 |
! -f $rootprefix/var/svc/manifest/system/hal.xml ]]; then |
85ea316d9c18
PSARC 2005/399 Tamarack: Removable Media Enhancements in Solaris
artem
parents:
2866
diff
changeset
|
1118 |
echo /usr/sbin/svcadm enable system/hal >> \ |
85ea316d9c18
PSARC 2005/399 Tamarack: Removable Media Enhancements in Solaris
artem
parents:
2866
diff
changeset
|
1119 |
$rootprefix/var/svc/profile/upgrade |
85ea316d9c18
PSARC 2005/399 Tamarack: Removable Media Enhancements in Solaris
artem
parents:
2866
diff
changeset
|
1120 |
fi |
85ea316d9c18
PSARC 2005/399 Tamarack: Removable Media Enhancements in Solaris
artem
parents:
2866
diff
changeset
|
1121 |
if [[ $zone = global && |
85ea316d9c18
PSARC 2005/399 Tamarack: Removable Media Enhancements in Solaris
artem
parents:
2866
diff
changeset
|
1122 |
! -f $rootprefix/var/svc/manifest/system/filesystem/rmvolmgr.xml ]]; then |
85ea316d9c18
PSARC 2005/399 Tamarack: Removable Media Enhancements in Solaris
artem
parents:
2866
diff
changeset
|
1123 |
echo /usr/sbin/svcadm enable system/filesystem/rmvolmgr >> \ |
953 | 1124 |
$rootprefix/var/svc/profile/upgrade |
1125 |
fi |
|
0 | 1126 |
} |
1127 |
||
1128 |
smf_copy_manifest() { |
|
1129 |
mfstbase=`basename $1` |
|
1130 |
mymfs=$rootprefix/var/svc/manifest/$2/$mfstbase |
|
1131 |
if [[ ! -f $mymfs ]] || ! cmp -s $manifest_src/$1 $mymfs ; then |
|
1132 |
cp $manifest_src/$1 $mymfs || |
|
1133 |
echo "bfu: could not copy $manifest_src/$1" |
|
1134 |
fi |
|
1135 |
} |
|
1136 |
||
1137 |
smf_copy_method() { |
|
1138 |
cp $manifest_src/$1 $rootprefix/lib/svc/method || |
|
1139 |
echo "bfu: could not copy $manifest_src/$1" |
|
1140 |
} |
|
1141 |
||
1142 |
smf_cleanup_initd() { |
|
1143 |
rm -f $rootprefix/etc/rc?.d/[SK]??$1 |
|
1144 |
} |
|
1145 |
||
1146 |
smf_delete_manifest() { |
|
1147 |
( |
|
1148 |
mfst=$1 |
|
1149 |
cd $root |
|
1150 |
[ -f $mfst ] || return; |
|
1151 |
if [ -r /etc/svc/volatile/repository_door ]; then |
|
1152 |
ENTITIES=`/tmp/bfubin/svccfg inventory $mfst` |
|
1153 |
for fmri in $ENTITIES; do |
|
1154 |
/tmp/bfubin/svccfg delete -f $fmri |
|
1155 |
done |
|
1156 |
fi |
|
1157 |
rm $mfst |
|
1158 |
) |
|
1159 |
} |
|
1160 |
||
1161 |
smf_delete_methods() { |
|
1162 |
( |
|
1163 |
cd $root; |
|
1164 |
rm -f $smf_obsolete_methods |
|
1165 |
) |
|
1166 |
} |
|
1167 |
||
1168 |
smf_delete_renamed_manifests() { |
|
1169 |
( |
|
1170 |
cd $root; |
|
1171 |
rm -f $smf_renamed_manifests |
|
1172 |
) |
|
1173 |
} |
|
1174 |
||
305 | 1175 |
smf_gldv3_manifests=" |
1176 |
var/svc/manifest/network/aggregation.xml |
|
1177 |
var/svc/manifest/network/datalink.xml |
|
1178 |
var/svc/manifest/network/datalink-init.xml |
|
1179 |
" |
|
1180 |
smf_gldv3_methods=" |
|
1181 |
lib/svc/method/aggregation |
|
1182 |
lib/svc/method/datalink |
|
1183 |
lib/svc/method/datalink-init |
|
1184 |
" |
|
1185 |
smf_cleanup_gldv3() { |
|
1186 |
( |
|
1187 |
for f in $smf_gldv3_manifests; do |
|
1188 |
smf_delete_manifest $f |
|
1189 |
done |
|
1190 |
cd $root; |
|
1191 |
rm -f $smf_gldv3_methods |
|
1192 |
) |
|
1193 |
} |
|
1194 |
||
0 | 1195 |
old_mfst_dir="var/svc/manifest.orig" |
1196 |
new_mfst_dir="var/svc/manifest" |
|
1197 |
||
1198 |
smf_enable() { |
|
1199 |
echo "svcadm enable $*" >> $rootprefix/var/svc/profile/upgrade |
|
1200 |
} |
|
1201 |
||
1202 |
smf_check_repository() { |
|
1203 |
repository=etc/svc/repository.db |
|
1204 |
[[ -f $rootprefix/$repository ]] || return |
|
1205 |
||
1206 |
print -n "$rootprefix/$repository: " >&2 |
|
1207 |
||
1208 |
sqlite="${SQLITEBIN-$GATE/public/bin/$bfu_isa/sqlite}" |
|
1209 |
[[ -x $sqlite ]] || sqlite=/lib/svc/bin/sqlite |
|
1210 |
if [[ ! -x $sqlite ]]; then |
|
1211 |
echo "no sqlite binary: skipped integrity check" >&2 |
|
1212 |
return |
|
1213 |
fi |
|
1214 |
||
1215 |
rm -f /tmp/bfurepo.db; |
|
1216 |
cp $rootprefix/$repository /tmp/bfurepo.db |
|
1217 |
bad_errors=`echo "PRAGMA integrity_check;" | |
|
1218 |
$sqlite /tmp/bfurepo.db 2>&1 | grep -v '^ok$'` |
|
1219 |
if [[ $? -eq 0 ]]; then |
|
1220 |
echo "integrity check failed:" >&2 |
|
1221 |
echo "$bad_errors" >&2 |
|
1222 |
echo >&2 |
|
1223 |
if [[ $force_override = no ]]; then |
|
1224 |
cat >&2 <<EOF |
|
1225 |
Reseed the repository (see http://greenline.eng/quickstart.shtml#newrep) |
|
1226 |
before BFUing (or use the -f flag to force BFU to continue). Re-seeding |
|
1227 |
will lose all smf(5) customizations. |
|
1228 |
EOF |
|
1229 |
echo >&2 |
|
1230 |
exit 2; |
|
1231 |
else |
|
1232 |
echo "driving on anyway" >&2 |
|
1233 |
fi |
|
1234 |
else |
|
1235 |
echo "passed integrity check" >&2; |
|
1236 |
fi |
|
1237 |
} |
|
1238 |
||
1239 |
smf_bkbfu_warning() { |
|
1240 |
print "" |
|
1241 |
print "*************************************************************" |
|
1242 |
print " WARNING: BFU'ing $1 backwards across 5090532." |
|
1243 |
print " Fixes have been made but the services cannot be refreshed" |
|
1244 |
print " on the $1's inactive repository. Next boot for the" |
|
1245 |
print " $1 will probably result in maintenance mode due to" |
|
1246 |
print " dependency cycles. If so, at the $1's console, run:" |
|
1247 |
print "" |
|
1248 |
print " /usr/sbin/svcadm refresh system/sysidtool:system" |
|
1249 |
print " /usr/sbin/svcadm refresh system/sysidtool:net" |
|
1250 |
print " /usr/sbin/svcadm clear milestone/single-user" |
|
1251 |
print " /usr/sbin/svcadm clear system/sysidtool:system" |
|
1252 |
print " /usr/sbin/svcadm clear system/sysidtool:net" |
|
1253 |
print "" |
|
1254 |
print " to resolve." |
|
1255 |
print " To avoid these problems, reseed the zone's repository." |
|
1256 |
print " See http://greenline.eng/quickstart.shtml#newrep ." |
|
1257 |
print " Note: Re-seeding will lose all smf(5) customization." |
|
1258 |
print "*************************************************************" |
|
1259 |
print "" |
|
1260 |
} |
|
1261 |
||
1262 |
smf_is_sysconfig() { |
|
1263 |
# |
|
1264 |
# Return success if going to post-5090532, i.e. post-sysconfig bits |
|
1265 |
# |
|
1266 |
# By now, we're going to post-smf bits - so multi-user.xml must |
|
1267 |
# exist (since it was introduced by first SMF putback). |
|
1268 |
# |
|
1269 |
# Function return status is return status of last command executed. |
|
1270 |
# So, no need to check return status from grep below. |
|
1271 |
||
1272 |
grep sysconfig $rootprefix/var/svc/manifest/milestone/multi-user.xml \ |
|
1273 |
>/dev/null 2>&1 |
|
1274 |
} |
|
1275 |
||
1276 |
smf_bkbfu_past_sysconfig() { |
|
1277 |
# |
|
1278 |
# Check if bfu'ing back from post-5090532 to pre-5090532 bits. |
|
1279 |
# |
|
1280 |
if [[ -f $rootprefix/var/svc/manifest/milestone/sysconfig.xml ]] && |
|
1281 |
! smf_is_sysconfig ; then |
|
1282 |
return 0 |
|
1283 |
fi |
|
1284 |
return 1 |
|
1285 |
} |
|
1286 |
||
1287 |
smf_bkbfu_repair_sysconfig() { |
|
1288 |
# |
|
1289 |
# Perform the necessary corrections when bfu'ing backwards |
|
1290 |
# from post-5090532 to pre-5090532 bits. |
|
1291 |
# |
|
1292 |
# Get the pre-5090532 non-ON manifests, and issue minimal fixes |
|
1293 |
# to the repository, to enable re-boot. |
|
1294 |
# |
|
1295 |
smf_copy_manifest pre-5090532/sysidtool.xml system |
|
1296 |
if [[ $zone = global && $karch = i86pc ]]; then |
|
1297 |
smf_copy_manifest pre-5090532/kdmconfig.xml platform/i86pc |
|
1298 |
fi |
|
1299 |
# |
|
1300 |
# Now, remove sysidtool:{system, net}'s dependency on |
|
1301 |
# single-user and filesystem-local. |
|
1302 |
# |
|
1303 |
# If $rootprefix is not empty, this could be the global zone, |
|
1304 |
# with an alternate root BFU, or a non-global zone. For either |
|
1305 |
# case, the repository to be updated is not the live one: use |
|
1306 |
# SVCCFG_REPOSITORY to point to the repository to be updated. |
|
1307 |
# |
|
1308 |
# Note that in the alternate-root case, doing this seems better |
|
1309 |
# than forcing the user to re-seed, or to dis-allow it. The |
|
1310 |
# issue of svccfg and the repository not matching seems remote, |
|
1311 |
# given that from initial SMF integration (on10_64) to on10_74, |
|
1312 |
# there was no mismatch. In the remote possibility that there is a |
|
1313 |
# mis-match (in the future) causing these calls to be suspect, |
|
1314 |
# the user is already being advised, via the warning message, to |
|
1315 |
# reseed the repository in case of trouble. If a mis-match is ever |
|
1316 |
# introduced, code such as this would have to be fixed, so this |
|
1317 |
# aspect of the warning is useful only during the interim period. |
|
1318 |
# |
|
1319 |
# NOTE that this is not an issue for non-global zones' |
|
1320 |
# repositories - they couldn't be out-of-sync with |
|
1321 |
# /tmp/bfubin/svccfg. |
|
1322 |
# |
|
1323 |
if [[ -n $rootprefix ]]; then |
|
1324 |
export SVCCFG_REPOSITORY=$rootprefix/etc/svc/repository.db |
|
1325 |
if [[ $zone = global ]]; then |
|
1326 |
smf_bkbfu_warning "alternate root" |
|
1327 |
else |
|
1328 |
smf_bkbfu_warning "zone" |
|
1329 |
fi |
|
1330 |
fi |
|
1331 |
# |
|
1332 |
# Using the newer "-s" option to svccfg in the following is OK |
|
1333 |
# since its introduction preceded 5090532 (and this routine wouldn't |
|
1334 |
# be called unless the machine is running post-5090532 bits). |
|
1335 |
# |
|
1336 |
/tmp/bfubin/svccfg -s system/sysidtool:net delpg single-user |
|
1337 |
/tmp/bfubin/svccfg -s system/sysidtool:system delpg single-user |
|
1338 |
/tmp/bfubin/svccfg -s system/sysidtool:net delpg filesystem_local |
|
1339 |
/tmp/bfubin/svccfg -s system/sysidtool:system delpg filesystem_local |
|
1340 |
||
1341 |
# |
|
1342 |
# On a live system, issue the refresh; For alternate root or non-global |
|
1343 |
# zone, the user was asked to issue the refreshes and "clear"s in the |
|
1344 |
# message above after a post-bfu reboot. |
|
1345 |
# |
|
1346 |
if [[ -z $rootprefix ]]; then |
|
1347 |
/tmp/bfubin/svcadm refresh system/sysidtool:system \ |
|
1348 |
system/sysidtool:net |
|
1349 |
fi |
|
1350 |
||
1351 |
# |
|
1352 |
# Now, reset SVCCFG_REPOSITORY, if it was set |
|
1353 |
# |
|
1354 |
[[ -n $rootprefix ]] && unset SVCCFG_REPOSITORY |
|
1355 |
||
1356 |
# |
|
1357 |
# Remove the sysconfig.xml manifest when going back. So backward |
|
1358 |
# bfu check continues to work, and all manifests are correct. |
|
1359 |
# |
|
1360 |
cat >> $rootprefix/var/svc/profile/upgrade <<-EOF |
|
1361 |
rm -f /var/svc/manifest/milestone/sysconfig.xml |
|
1362 |
EOF |
|
1363 |
} |
|
1364 |
||
3446 | 1365 |
# |
1366 |
# Return true if $file exists in $archive. $file may also be a pattern. |
|
1367 |
# |
|
1368 |
archive_file_exists() |
|
1369 |
{ |
|
1370 |
archive=$1 |
|
1371 |
file=$2 |
|
1372 |
||
1373 |
$ZCAT $cpiodir/${archive}${ZFIX} | cpio -it 2>/dev/null | \ |
|
1374 |
egrep -s "$file" |
|
1375 |
} |
|
1376 |
||
1377 |
# |
|
1378 |
# If we're no longer delivering the eeprom service, remove it from the system, |
|
1379 |
# as eeprom -I is removed as well. |
|
1380 |
# |
|
1381 |
smf_fix_i86pc_profile () { |
|
1382 |
mfst="var/svc/manifest/platform/i86pc/eeprom.xml" |
|
1383 |
profile="var/svc/profile/platform_i86pc.xml" |
|
1384 |
||
1385 |
if [ ! "$karch" = "i86pc" ]; then |
|
1386 |
return |
|
1387 |
fi |
|
1388 |
||
1389 |
if ! archive_file_exists generic.root "^$profile"; then |
|
1390 |
rm -f $rootprefix/$profile |
|
3604
66c3c8c384a6
6521479 bfu leaves dangling /var/svc/profile/platform.xml link
johnlev
parents:
3529
diff
changeset
|
1391 |
rm -f $rootprefix/var/svc/profile/platform.xml |
3446 | 1392 |
fi |
1393 |
||
1394 |
if [ ! -f $rootprefix/$mfst ]; then |
|
1395 |
return |
|
1396 |
fi |
|
1397 |
||
1398 |
if archive_file_exists generic.root "^$mfst"; then |
|
1399 |
return |
|
1400 |
fi |
|
1401 |
||
1402 |
rm -f $rootprefix/$mfst |
|
1403 |
||
1404 |
# |
|
1405 |
# we must disable via svccfg directly, as manifest-import runs after |
|
1406 |
# this service tries to run |
|
1407 |
# |
|
1408 |
[[ -n "$rootprefix" ]] && |
|
1409 |
export SVCCFG_REPOSITORY=$rootprefix/etc/svc/repository.db |
|
1410 |
/tmp/bfubin/svccfg delete -f platform/i86pc/eeprom |
|
1411 |
[[ -n "$rootprefix" ]] && unset SVCCFG_REPOSITORY |
|
1412 |
} |
|
1413 |
||
0 | 1414 |
smf_apply_conf () { |
1415 |
# |
|
1416 |
# Go thru the original manifests and move any that were unchanged |
|
1417 |
# (or are not system-provided) back to their proper location. This |
|
1418 |
# will avoid superfluous re-import on reboot, as the inode and mtime |
|
1419 |
# are both part of the hash. |
|
1420 |
# |
|
1421 |
if [ -d $rootprefix/$old_mfst_dir ]; then |
|
1422 |
for f in `cd $rootprefix/$old_mfst_dir ; find . -type f` |
|
1423 |
do |
|
1424 |
old=$rootprefix/$old_mfst_dir/$f |
|
1425 |
new=$rootprefix/$new_mfst_dir/$f |
|
1426 |
if [ ! -f $new ]; then |
|
1427 |
mkdir -m 0755 -p `dirname $new` |
|
1428 |
mv $old $new |
|
1429 |
continue |
|
1430 |
fi |
|
1431 |
cmp -s $old $new && mv $old $new |
|
1432 |
done |
|
1433 |
rm -rf $rootprefix/$old_mfst_dir |
|
1434 |
fi |
|
1435 |
||
1436 |
if [ -f $rootprefix/etc/init.d/inetd ]; then |
|
1437 |
# |
|
1438 |
# BFUing to non-SMF system -- undo our previous changes, |
|
1439 |
# run an old hack, and skip the remainder of this function. |
|
1440 |
# |
|
1441 |
smf_inetd_reenable |
|
1442 |
smf_tftp_reinstall |
|
1443 |
||
1444 |
# Update inetd.conf only if we find rpc.metad file. |
|
1445 |
[ -f $usr/sbin/rpc.metad ] && |
|
1446 |
inetd_conf_svm_hack |
|
1447 |
||
1448 |
return |
|
1449 |
fi |
|
1450 |
||
1451 |
# |
|
1452 |
# At this point, the archive in question is a SMF version. If |
|
1453 |
# the smf(5) repository does not yet exist, create it by copying |
|
1454 |
# the appropriate seed repository. Since updating of non-global |
|
1455 |
# zones only occurs when the live system is bfu'ed, the |
|
1456 |
# appropriate seed is guaranteed to exist under the /lib |
|
1457 |
# directory. |
|
1458 |
# |
|
1459 |
repository=$rootprefix/etc/svc/repository.db |
|
1460 |
if [ ! -f $repository ]; then |
|
1461 |
print "Initializing service configuration repository ..." |
|
1462 |
if [ $zone = global ]; then |
|
1463 |
cp $rootprefix/lib/svc/seed/global.db $repository |
|
1464 |
else |
|
1465 |
cp /lib/svc/seed/nonglobal.db $repository |
|
1466 |
fi |
|
1467 |
chmod 0600 $repository |
|
1468 |
chown root:sys $repository |
|
1469 |
fi |
|
1470 |
||
1471 |
print "Removing obsolete smf services ..." |
|
1472 |
for f in $smf_obsolete_manifests; do |
|
1473 |
smf_delete_manifest $f |
|
1474 |
done |
|
1475 |
smf_delete_methods |
|
1476 |
smf_delete_renamed_manifests |
|
305 | 1477 |
if [ $need_datalink = no ]; then |
1478 |
smf_cleanup_gldv3 |
|
1479 |
fi |
|
0 | 1480 |
|
1481 |
print "Disabling unneeded inetd.conf entries ..." |
|
1482 |
smf_inetd_disable |
|
1483 |
smf_tftp_reinstall |
|
1484 |
||
1485 |
print "Connecting platform and name service profiles ..." |
|
1486 |
||
1487 |
rm -f $rootprefix/var/svc/profile/name_service.xml |
|
1488 |
||
1489 |
grep ldap $rootprefix/etc/nsswitch.conf >/dev/null 2>&1 |
|
1490 |
is_ldap=$? |
|
1491 |
grep nisplus $rootprefix/etc/nsswitch.conf >/dev/null 2>&1 |
|
1492 |
is_nisplus=$? |
|
1493 |
grep nis $rootprefix/etc/nsswitch.conf >/dev/null 2>&1 |
|
1494 |
is_nis=$? |
|
1495 |
||
1496 |
if [ $is_ldap = 0 ]; then |
|
1497 |
ns_profile=ns_ldap.xml |
|
1498 |
elif [ $is_nisplus = 0 ]; then |
|
1499 |
ns_profile=ns_nisplus.xml |
|
1500 |
elif [ $is_nis = 0 ]; then |
|
1501 |
ns_profile=ns_nis.xml |
|
1502 |
else |
|
1503 |
ns_profile=ns_files.xml |
|
1504 |
fi |
|
1505 |
||
1506 |
ln -s $ns_profile $rootprefix/var/svc/profile/name_service.xml |
|
1507 |
||
1508 |
rm -f $rootprefix/var/svc/profile/inetd_services.xml |
|
1509 |
ln -s inetd_upgrade.xml $rootprefix/var/svc/profile/inetd_services.xml |
|
1510 |
||
1511 |
print "Marking converted services as enabled ..." |
|
1512 |
||
1513 |
[ -f $rootprefix/etc/resolv.conf ] && smf_enable network/dns/client |
|
1514 |
[ -f $rootprefix/etc/rcap.conf ] && smf_enable system/rcap |
|
1515 |
[ -f $rootprefix/etc/inet/dhcpsvc.conf ] && \ |
|
1516 |
smf_enable network/dhcp-server |
|
1517 |
||
1518 |
if [ $zone = global ]; then |
|
1519 |
if [ -f $rootprefix/etc/dfs/dfstab ] && |
|
1520 |
grep '^[ ]*[^# ]' $rootprefix/etc/dfs/dfstab \ |
|
1521 |
> /dev/null; then |
|
1522 |
smf_enable network/nfs/server |
|
1523 |
fi |
|
1524 |
else |
|
1525 |
echo "/usr/sbin/svcadm disable network/nfs/server" >> \ |
|
1526 |
$rootprefix/var/svc/profile/upgrade |
|
1527 |
fi |
|
1528 |
||
1529 |
[ -f $rootprefix/etc/inet/ntp.conf ] && smf_enable network/ntp |
|
1530 |
||
1531 |
||
1532 |
domainname=`cat $rootprefix/etc/defaultdomain 2>/dev/null` |
|
1533 |
if [ ! -z "$domainname" -a -d $rootprefix/var/yp/$domainname ]; then |
|
1534 |
smf_enable network/nis/server |
|
1535 |
||
1536 |
# Determining whether we're a NIS master requires |
|
1537 |
# looking through the maps. |
|
1538 |
cat >>$rootprefix/var/svc/profile/upgrade <<\_EOF |
|
1539 |
# Determine whether we are a YP master. |
|
1540 |
domain=`/usr/bin/domainname` |
|
1541 |
hostname=`uname -n | cut -d. -f1 | tr '[A-Z]' '[a-z]'` |
|
1542 |
||
1543 |
if [ -x /usr/sbin/makedbm ]; then |
|
1544 |
if [ -f /var/yp/NISLDAPmapping ]; then |
|
1545 |
master=`/usr/sbin/makedbm -u /var/yp/\$domain/LDAP_passwd.byname | grep YP_MASTER_NAME | nawk '{ print $2 }'` |
|
1546 |
else |
|
1547 |
master=`/usr/sbin/makedbm -u /var/yp/\$domain/passwd.byname | grep YP_MASTER_NAME | nawk '{ print $2 }'` |
|
1548 |
fi |
|
1549 |
fi |
|
1550 |
||
1551 |
# If we are the master server, enable appropriate services. |
|
1552 |
if [ "$master" = "$hostname" -a "$YP_SERVER" = "TRUE" ]; then |
|
1553 |
/usr/sbin/svcadm enable network/nis/xfr |
|
1554 |
/usr/sbin/svcadm enable network/nis/passwd |
|
1555 |
||
1556 |
if [ ! -f /var/yp/NISLDAPmapping ]; then |
|
1557 |
[ -f /var/yp/updaters ] && \ |
|
1558 |
/usr/svc/svcadm enable network/nis/update |
|
1559 |
fi |
|
1560 |
fi |
|
1561 |
_EOF |
|
1562 |
fi |
|
1563 |
||
1564 |
# Check if mddbs don't exist on the image. If so, disable SVM services. |
|
1565 |
MDDB_STATUS=1 |
|
1566 |
if [ -f $rootprefix/kernel/drv/md.conf ]; then |
|
1567 |
sed -e 's/#.*$//' $rootprefix/kernel/drv/md.conf | \ |
|
1568 |
egrep '^[ ]*mddb_bootlist' >/dev/null 2>&1 |
|
1569 |
MDDB_STATUS=$? |
|
1570 |
fi |
|
1571 |
||
1572 |
if [ $MDDB_STATUS -ne 0 ]; then |
|
1573 |
for svc in metainit mdmonitor; do |
|
1574 |
echo "/usr/sbin/svcadm disable system/$svc:default" >> \ |
|
1575 |
$rootprefix/var/svc/profile/upgrade |
|
1576 |
done |
|
1577 |
||
1578 |
for svc in meta mdcomm metamed metamh; do |
|
1579 |
echo "/usr/sbin/svcadm disable network/rpc/$svc:default" \ |
|
1580 |
>> $rootprefix/var/svc/profile/upgrade |
|
1581 |
done |
|
1582 |
fi |
|
1583 |
||
1584 |
# Workaround inetd's handling of "tcp6/udp6" when no IPv6 interfaces |
|
1585 |
# are configured. |
|
1586 |
for svc in meta mdcomm metamed metamh; do |
|
1587 |
echo "/usr/sbin/inetadm -m network/rpc/$svc:default proto=tcp" \ |
|
1588 |
">/dev/null 2>&1" >> $rootprefix/var/svc/profile/upgrade |
|
1589 |
done |
|
1590 |
||
1591 |
manifest_src=${MANIFEST_SRC-$GATE/public/smf} |
|
1592 |
[[ -d $manifest_src ]] || |
|
1593 |
manifest_src=/net/onnv.eng/export/gate/public/smf |
|
1594 |
[[ -d $manifest_src ]] || manifest_src=/net/greenline.eng/meta0/smf |
|
1595 |
||
1596 |
if smf_bkbfu_past_sysconfig ; then |
|
1597 |
echo "BFU'ing backwards across 5090532! Now repairing..." |
|
1598 |
smf_bkbfu_repair_sysconfig |
|
1599 |
fi |
|
1600 |
||
1601 |
# |
|
1602 |
# If bfu'ing milestone/sysconfig bits or onwards, update the |
|
1603 |
# corresponding non-ON manifests - sysidtool and kdmconfig. |
|
1604 |
# |
|
1605 |
sysidmfst=$rootprefix/var/svc/manifest/system/sysidtool.xml |
|
1606 |
kdmmfst=$rootprefix/var/svc/manifest/platform/i86pc/kdmconfig.xml |
|
1607 |
if smf_is_sysconfig ; then |
|
1608 |
if [[ ! -f $sysidmfst ]]; then |
|
1609 |
# |
|
1610 |
# if WOS build on machine is pre-greenline, and |
|
1611 |
# we're bfu'ing to the sysconfig bits. |
|
1612 |
# |
|
1613 |
smf_copy_manifest post-5090532/sysidtool.xml system |
|
1614 |
if [[ $zone = global ]]; then |
|
1615 |
smf_copy_method sysidtool-net |
|
1616 |
smf_copy_method sysidtool-system |
|
1617 |
fi |
|
1618 |
echo "Converted system/sysidtool (post-5090532)" |
|
1619 |
else |
|
1620 |
# |
|
1621 |
# If sysidtool.xml already exists, update it |
|
1622 |
# if necessary. Future updates of sysidtool.xml |
|
1623 |
# must occur in the dir: $manifest_src/post-5090532 |
|
1624 |
# |
|
1625 |
smf_copy_manifest post-5090532/sysidtool.xml system |
|
1626 |
fi |
|
1627 |
if [[ $zone = global && $karch = i86pc ]]; then |
|
1628 |
if [[ ! -f $kdmmfst ]]; then |
|
1629 |
# |
|
1630 |
# if WOS build on machine is pre-greenline, and |
|
1631 |
# we're bfu'ing to the sysconfig bits. |
|
1632 |
# |
|
1633 |
smf_copy_manifest post-5090532/kdmconfig.xml \ |
|
1634 |
platform/i86pc |
|
1635 |
smf_copy_method svc-kdmconfig |
|
1636 |
smf_cleanup_initd kdmconfig |
|
1637 |
echo "Converted platform/i86pc/kdmconfig" |
|
1638 |
echo "(post-5090532)" |
|
1639 |
else |
|
1640 |
# |
|
1641 |
# If kdmconfig.xml already exists, update |
|
1642 |
# it if necessary. Future updates of |
|
1643 |
# kdmconfig.xml must occur in the dir: |
|
1644 |
# $manifest_src/post-5090532 |
|
1645 |
# |
|
1646 |
smf_copy_manifest post-5090532/kdmconfig.xml \ |
|
1647 |
platform/i86pc |
|
1648 |
fi |
|
1649 |
fi |
|
1650 |
else |
|
1651 |
if [[ ! -f $sysidmfst ]]; then |
|
1652 |
smf_copy_manifest pre-5090532/sysidtool.xml system |
|
1653 |
if [[ $zone = global ]]; then |
|
1654 |
smf_copy_method sysidtool-net |
|
1655 |
smf_copy_method sysidtool-system |
|
1656 |
fi |
|
1657 |
echo "Converted system/sysidtool" |
|
1658 |
fi |
|
1659 |
if [[ $zone = global && $karch = i86pc && ! -f $kdmmfst ]]; |
|
1660 |
then |
|
1661 |
smf_copy_manifest pre-5090532/kdmconfig.xml \ |
|
1662 |
platform/i86pc |
|
1663 |
smf_copy_method svc-kdmconfig |
|
1664 |
smf_cleanup_initd kdmconfig |
|
1665 |
echo "Converted platform/i86pc/kdmconfig" |
|
1666 |
fi |
|
1667 |
fi |
|
1668 |
||
1669 |
# If we've still got the old dtlogin manifest delivered by earlier |
|
1670 |
# versions of bfu, delete it, as it was broken and should have |
|
1671 |
# never been delivered. A new version delivered by the CDE |
|
1672 |
# consolidation should be left alone. |
|
1673 |
if [[ -f $rootprefix/var/svc/manifest/application/dtlogin.xml && |
|
1674 |
`grep -c GLXXX \ |
|
1675 |
$rootprefix/var/svc/manifest/application/dtlogin.xml` -gt 0 && |
|
1676 |
-x /tmp/bfubin/svccfg ]]; then |
|
1677 |
||
1678 |
# Delete the obsolete manifest. |
|
1679 |
rm -f $rootprefix/var/svc/manifest/application/dtlogin.xml |
|
1680 |
||
1681 |
# Delete the service from repository, then use dtconfig -e to |
|
1682 |
# revert to whatever the WOS bits are using if dtlogin was |
|
1683 |
# enabled. |
|
1684 |
cat >> $rootprefix/var/svc/profile/upgrade <<-EOFA |
|
1685 |
if /usr/bin/svcprop -q application/cde-login; then |
|
1686 |
if [ \`/usr/bin/svcprop -p general/enabled \ |
|
1687 |
application/cde-login:default\` = "true" ]; then |
|
1688 |
do_dtconfig=1; |
|
1689 |
else |
|
1690 |
do_dtconfig=0; |
|
1691 |
fi |
|
1692 |
||
1693 |
/usr/sbin/svccfg delete -f application/cde-login |
|
1694 |
type instance_refresh 2>&1 > /dev/null |
|
1695 |
if [ \$? = 0 ]; then |
|
1696 |
instance_refresh system/console-login |
|
1697 |
else |
|
1698 |
/usr/sbin/svcadm refresh system/console-login |
|
1699 |
fi |
|
1700 |
||
1701 |
if [ \$do_dtconfig -eq 1 -a -x /usr/dt/bin/dtconfig ]; then |
|
1702 |
/usr/dt/bin/dtconfig -e |
|
1703 |
fi |
|
1704 |
fi |
|
1705 |
EOFA |
|
1706 |
fi |
|
1707 |
||
1708 |
||
1709 |
# Enable the inetd-upgrade service to convert any changes to inetd.conf |
|
1710 |
smf_enable network/inetd-upgrade |
|
1711 |
||
1712 |
# If global zone, and bfu'ing from smf, and the inetd-upgrade |
|
1713 |
# service has an obsolete dependency, then add a clear of inetd |
|
1714 |
# and inetd-upgrade to the upgrade file as either may drop into |
|
1715 |
# maintenance due to a dependency loop resulting from the new |
|
1716 |
# inetd manifest |
|
1717 |
if [[ $zone = global && -x /tmp/bfubin/svccfg ]]; then |
|
1718 |
/tmp/bfubin/svcprop -q -p network/entities network/inetd-upgrade |
|
1719 |
if [[ $? = 0 ]]; then |
|
1720 |
echo "/usr/sbin/svcadm clear network/inetd" >> \ |
|
1721 |
$rootprefix/var/svc/profile/upgrade |
|
1722 |
echo "/usr/sbin/svcadm clear network/inetd-upgrade" >> \ |
|
1723 |
$rootprefix/var/svc/profile/upgrade |
|
1724 |
fi |
|
1725 |
fi |
|
1726 |
||
1727 |
# If we're in the global zone, and using an alternate root, see if |
|
2958 | 1728 |
# we are in an smf root. If so, import name-service-cache. If we're |
1729 |
# not bfu'ing an alternate root, and we're post-smf, import |
|
1730 |
# name-service-cache. This is to get name-service-cache(with correct |
|
1731 |
# dependencies) in the repository before reboot. If we're bfu'ing |
|
1732 |
# from pre-smf, this isn't an issue, as name-service-cache will be |
|
1733 |
# installed with correct dependencies. |
|
0 | 1734 |
if [[ $zone = global && |
2958 | 1735 |
-f $rootprefix/var/svc/manifest/system/name-service-cache.xml ]]; |
1736 |
then |
|
0 | 1737 |
if [[ -n $rootprefix ]]; then |
1738 |
if [ -x /usr/sbin/svccfg ]; then |
|
1739 |
SVCCFG_REPOSITORY=$rootprefix/etc/svc/repository.db |
|
1740 |
/usr/sbin/svccfg import \ |
|
1741 |
$rootprefix/var/svc/manifest/system/name-service-cache.xml |
|
1742 |
else |
|
2958 | 1743 |
echo "Warning: This system does not have SMF, so I " |
1744 |
echo "cannot ensure the pre-import of " |
|
1745 |
echo "name-service-cache. If name-service-cache does " |
|
1746 |
echo "not work, reboot your alternate root to fix it." |
|
0 | 1747 |
fi |
1748 |
elif [ -x /tmp/bfubin/svccfg ]; then |
|
1749 |
/tmp/bfubin/svccfg import \ |
|
1750 |
/var/svc/manifest/system/name-service-cache.xml |
|
1751 |
fi |
|
1752 |
fi |
|
1753 |
||
305 | 1754 |
# If we're in the global zone, and using an alternate root, see if |
1755 |
# we are in an smf root. If so, import datalink and aggregation svcs. |
|
1756 |
# If we're not bfu'ing an alternate root, and we're post-smf, |
|
1757 |
# import datalink and aggregation. This is to get them |
|
1758 |
# in the repository before reboot. If we're bfu'ing from pre-smf, |
|
1759 |
# this isn't an issue, as they are in the seed repository. |
|
1760 |
if [[ $zone = global && |
|
1761 |
-f $rootprefix/var/svc/manifest/network/datalink.xml ]]; then |
|
1762 |
if [[ -n $rootprefix ]]; then |
|
1763 |
if [ -x /usr/sbin/svccfg ]; then |
|
1764 |
SVCCFG_REPOSITORY=$rootprefix/etc/svc/repository.db |
|
1765 |
sed -e "s/enabled='true'/enabled='false'/" \ |
|
1766 |
$rootprefix/var/svc/manifest/network/aggregation.xml \ |
|
1767 |
| svccfg import - |
|
1768 |
sed -e "s/enabled='true'/enabled='false'/" \ |
|
1769 |
$rootprefix/var/svc/manifest/network/datalink.xml \ |
|
1770 |
| svccfg import - |
|
1771 |
sed -e "s/enabled='true'/enabled='false'/" \ |
|
1772 |
$rootprefix/var/svc/manifest/network/datalink-init.xml \ |
|
1773 |
| svccfg import - |
|
1774 |
else |
|
1775 |
echo "Warning: This system does not have SMF, so I" |
|
1776 |
echo "cannot ensure the pre-import of datalink and" |
|
1777 |
echo "network aggregation. If they do not work" |
|
1778 |
echo "reboot your alternate root to fix it." |
|
1779 |
fi |
|
1780 |
elif [ -x /tmp/bfubin/svccfg ]; then |
|
1781 |
sed -e "s/enabled='true'/enabled='false'/" \ |
|
1782 |
/var/svc/manifest/network/aggregation.xml | \ |
|
1783 |
svccfg import - |
|
1784 |
sed -e "s/enabled='true'/enabled='false'/" \ |
|
1785 |
/var/svc/manifest/network/datalink.xml | \ |
|
1786 |
svccfg import - |
|
1787 |
sed -e "s/enabled='true'/enabled='false'/" \ |
|
1788 |
/var/svc/manifest/network/datalink-init.xml | \ |
|
1789 |
svccfg import - |
|
1790 |
fi |
|
1791 |
||
1792 |
# |
|
1793 |
# Make sure the services are enabled after reboot. |
|
1794 |
# |
|
1795 |
enable_next_boot svc:/network/aggregation:default |
|
1796 |
enable_next_boot svc:/network/datalink:default |
|
1797 |
enable_next_boot svc:/network/datalink-init:default |
|
1798 |
fi |
|
1799 |
||
0 | 1800 |
# Enable new NFS status and nlockmgr services if client is enabled |
1801 |
cat >> $rootprefix/var/svc/profile/upgrade <<-EOF |
|
1802 |
cl="svc:/network/nfs/client:default" |
|
1803 |
if [ \`/usr/bin/svcprop -p general/enabled \$cl\` = "true" ]; then |
|
1804 |
/usr/sbin/svcadm enable svc:/network/nfs/status:default |
|
1805 |
/usr/sbin/svcadm enable svc:/network/nfs/nlockmgr:default |
|
1806 |
fi |
|
1807 |
||
1808 |
EOF |
|
1809 |
||
1810 |
kpmani="$rootprefix/var/svc/manifest/network/security/krb5_prop.xml" |
|
1811 |
if grep svc-kdc.slave $kpmani > /dev/null 2>&1; then |
|
1812 |
cat >> $rootprefix/var/svc/profile/upgrade <<EOF |
|
1813 |
# We are deleting and reimporting kpropd's manifest, because we |
|
1814 |
# need to change the restarter. |
|
1815 |
kpfmri="svc:/network/security/krb5_prop" |
|
1816 |
kkfmri="svc:/network/security/krb5kdc:default" |
|
1817 |
lkpmani="/var/svc/manifest/network/security/krb5_prop.xml" |
|
1818 |
restarter=\`svcprop -c -p general/restarter \$kpfmri 2>&1\` |
|
1819 |
case \$restarter in |
|
1820 |
*network/inetd:default) |
|
1821 |
kken=\`svcprop -c -p general/enabled \$kkfmri\` |
|
1822 |
svccfg delete -f \$kpfmri |
|
1823 |
svccfg import \$lkpmani |
|
1824 |
# Enable kpropd if krb5kdc is enabled, since |
|
1825 |
# krb5kdc would have run kpropd |
|
1826 |
if [ \$kken = "true" ]; then |
|
1827 |
svcadm enable \$kpfmri |
|
1828 |
fi |
|
1829 |
;; |
|
1830 |
esac |
|
1831 |
EOF |
|
1832 |
fi |
|
1833 |
||
1834 |
# Enable print server if there are local queues |
|
1835 |
queues=`echo $rootprefix/etc/lp/printers/*/configuration` |
|
1836 |
if [ "$queues" != "$rootprefix/etc/lp/printers/*/configuration" ]; then |
|
1837 |
smf_enable application/print/server |
|
1838 |
fi |
|
1839 |
||
1840 |
# Enable rarpd and bootparamd if they would have been running pre-SMF |
|
1841 |
if [ -d $rootprefix/tftpboot ] || [ -d $rootprefix/rplboot ]; then |
|
1842 |
smf_enable network/rarp |
|
1843 |
smf_enable network/rpc/bootparams |
|
1844 |
fi |
|
1845 |
||
1846 |
# To handle the transition from pre-smf ipfilter to smf-aware ipfilter, |
|
1847 |
# check if ipfilter had been enabled with at least one rule, and if so |
|
1848 |
# enable the smf instance. |
|
1849 |
if grep '^[ \t]*[^# \t]' $rootprefix/etc/ipf/ipf.conf >/dev/null 2>&1 && |
|
1850 |
[[ $zone = global ]]; then |
|
1851 |
smf_enable network/ipfilter |
|
1852 |
fi |
|
1853 |
||
1854 |
touch $rootprefix/var/svc/profile/.upgrade_prophist |
|
1855 |
||
1120
f038ea42ae91
4792021 per-socket level IPsec policy for dynamic reconfiguration
mb158278
parents:
1106
diff
changeset
|
1856 |
cat >> $rootprefix/var/svc/profile/upgrade <<EOF |
f038ea42ae91
4792021 per-socket level IPsec policy for dynamic reconfiguration
mb158278
parents:
1106
diff
changeset
|
1857 |
# We are deleting and reimporting dcs's manifest, because we |
f038ea42ae91
4792021 per-socket level IPsec policy for dynamic reconfiguration
mb158278
parents:
1106
diff
changeset
|
1858 |
# need to change the restarter. |
f038ea42ae91
4792021 per-socket level IPsec policy for dynamic reconfiguration
mb158278
parents:
1106
diff
changeset
|
1859 |
dcsfmri="svc:/platform/sun4u/dcs:default" |
f038ea42ae91
4792021 per-socket level IPsec policy for dynamic reconfiguration
mb158278
parents:
1106
diff
changeset
|
1860 |
dcsmani="/var/svc/manifest/platform/sun4u/dcs.xml" |
f038ea42ae91
4792021 per-socket level IPsec policy for dynamic reconfiguration
mb158278
parents:
1106
diff
changeset
|
1861 |
restarter=\`svcprop -c -p general/restarter \$dcsfmri 2>&1\` |
f038ea42ae91
4792021 per-socket level IPsec policy for dynamic reconfiguration
mb158278
parents:
1106
diff
changeset
|
1862 |
case \$restarter in |
f038ea42ae91
4792021 per-socket level IPsec policy for dynamic reconfiguration
mb158278
parents:
1106
diff
changeset
|
1863 |
*network/inetd:default) |
f038ea42ae91
4792021 per-socket level IPsec policy for dynamic reconfiguration
mb158278
parents:
1106
diff
changeset
|
1864 |
en=\`svcprop -c -p general/enabled \$dcsfmri\` |
f038ea42ae91
4792021 per-socket level IPsec policy for dynamic reconfiguration
mb158278
parents:
1106
diff
changeset
|
1865 |
svccfg delete -f \$dcsfmri |
f038ea42ae91
4792021 per-socket level IPsec policy for dynamic reconfiguration
mb158278
parents:
1106
diff
changeset
|
1866 |
svccfg import \$dcsmani |
f038ea42ae91
4792021 per-socket level IPsec policy for dynamic reconfiguration
mb158278
parents:
1106
diff
changeset
|
1867 |
if [ \$en = "true" ]; then |
f038ea42ae91
4792021 per-socket level IPsec policy for dynamic reconfiguration
mb158278
parents:
1106
diff
changeset
|
1868 |
svcadm enable \$dcsfmri |
f038ea42ae91
4792021 per-socket level IPsec policy for dynamic reconfiguration
mb158278
parents:
1106
diff
changeset
|
1869 |
fi |
f038ea42ae91
4792021 per-socket level IPsec policy for dynamic reconfiguration
mb158278
parents:
1106
diff
changeset
|
1870 |
;; |
f038ea42ae91
4792021 per-socket level IPsec policy for dynamic reconfiguration
mb158278
parents:
1106
diff
changeset
|
1871 |
esac |
f038ea42ae91
4792021 per-socket level IPsec policy for dynamic reconfiguration
mb158278
parents:
1106
diff
changeset
|
1872 |
EOF |
f038ea42ae91
4792021 per-socket level IPsec policy for dynamic reconfiguration
mb158278
parents:
1106
diff
changeset
|
1873 |
|
3446 | 1874 |
smf_fix_i86pc_profile |
0 | 1875 |
} |
1876 |
||
1877 |
EXTRACT_LOG=/tmp/bfu-extract-log.$$ |
|
1878 |
||
1879 |
rm -f $EXTRACT_LOG |
|
1880 |
||
1881 |
extraction_error() { |
|
1882 |
echo error $* >> $EXTRACT_LOG |
|
1883 |
} |
|
1884 |
||
1885 |
# |
|
1886 |
# Make a local copy of bfu in /tmp and execute that instead. |
|
1887 |
# This makes us immune to loss of networking and/or changes |
|
1888 |
# to the original copy that might occur during execution. |
|
1889 |
# |
|
1890 |
cd . |
|
1891 |
abspath=`[[ $0 = /* ]] && print $0 || print $PWD/$0` |
|
1892 |
if [[ $abspath != /tmp/* ]]; then |
|
1893 |
localpath=/tmp/bfu.$$ |
|
1894 |
print "Copying $abspath to $localpath" |
|
1895 |
cp $abspath $localpath |
|
1896 |
chmod +x $localpath |
|
1897 |
print "Executing $localpath $*\n" |
|
1898 |
exec $localpath $* |
|
1899 |
fi |
|
1900 |
||
1901 |
export PATH=/usr/bin:/usr/sbin:/sbin |
|
1902 |
||
1903 |
usage() { |
|
1904 |
echo "Usage:" |
|
1905 |
echo " bfu [-fh] <archive_dir> [root-dir]" |
|
1906 |
echo "\tUpdate a single machine by loading archives on root-dir." |
|
1907 |
echo "\troot-dir defaults to / (a live bfu).\n" |
|
1908 |
echo " bfu -c [-fh] <archive_dir> <exec-dir>" |
|
1909 |
echo "\tUpdate all diskless clients by loading archives on each client" |
|
1910 |
echo "\tthat mounts exec-dir as /usr. <exec-dir> must start with" |
|
1911 |
echo "\t/export/exec and each client's root must be in /export/root.\n" |
|
1912 |
echo "\t-f force bfu to continue even if it doesn't seem safe" |
|
1913 |
fail "\t-h|-help print this usage message and exit\n" |
|
1914 |
} |
|
1915 |
||
1916 |
diskless=no |
|
1917 |
force_override=no |
|
1918 |
while [ $# -gt 0 ]; do |
|
1919 |
case $1 in |
|
1920 |
-c) diskless=yes;; |
|
1921 |
-f) force_override=yes;; |
|
1922 |
-h|-help) usage;; |
|
1923 |
*) break;; |
|
1924 |
esac |
|
1925 |
shift |
|
1926 |
done |
|
1927 |
||
3446 | 1928 |
# Variables for x86 platforms |
0 | 1929 |
boot_is_pcfs=no |
1930 |
have_realmode=no |
|
1931 |
is_pcfs_boot=no |
|
305 | 1932 |
need_datalink=no |
3147 | 1933 |
new_dladm=no |
0 | 1934 |
|
3446 | 1935 |
# Set when moving to either directboot or multiboot |
1936 |
multi_or_direct=no |
|
1937 |
||
1938 |
# |
|
1939 |
# Shows which type of archives we have, which type of system we are |
|
1940 |
# running on (before the bfu), and what the failsafe archives are |
|
1941 |
# (again, before the bfu). failsafe_type is only needed on diskful |
|
1942 |
# bfu's, so it's not set in the diskless case. |
|
1943 |
# Possible values: unknown, dca, multiboot, directboot |
|
1944 |
# |
|
1945 |
archive_type=unknown |
|
1946 |
system_type=unknown |
|
1947 |
failsafe_type=unknown |
|
1948 |
||
0 | 1949 |
test $# -ge 1 || usage |
1950 |
||
1951 |
if [ -x /usr/bin/ppriv ]; then |
|
1952 |
# We prefer to use ppriv, as it is a more accurate test, and also |
|
3948
b8d304c37bf9
6535942 bfu and acr don't tolerate non-native zones other than 'lx'
dp
parents:
3893
diff
changeset
|
1953 |
# has the benefit of preventing use from within a nonglobal zone. |
0 | 1954 |
ppriv $$ | grep -w "E: all" > /dev/null 2>&1 || \ |
1955 |
fail "bfu requires all privileges" |
|
1956 |
else |
|
1957 |
# Fall back to old id check if system does not yet have ppriv. |
|
1958 |
uid=`id | nawk '{print $1}'` |
|
1959 |
[ "$uid" = "uid=0(root)" ] || \ |
|
1960 |
fail "You must be super-user to run this script." |
|
1961 |
fi |
|
1962 |
||
1963 |
bfu_isa=`uname -p` |
|
1964 |
target_isa=$bfu_isa |
|
1965 |
karch=`uname -m` |
|
1966 |
plat=`uname -i` |
|
1967 |
||
1968 |
cpiodir=$1 |
|
1969 |
||
1970 |
if [ "$cpiodir" = again ]; then |
|
1971 |
cpiodir=`nawk '/^bfu.ed from / { print $3; exit }' /etc/motd` |
|
1972 |
fi |
|
1973 |
||
1974 |
[[ "$cpiodir" = */* ]] || cpiodir=$ARCHIVE/archives/$target_isa/$1 |
|
1975 |
||
1976 |
[[ "$cpiodir" = /* ]] || fail "archive-dir must be an absolute path" |
|
1977 |
||
1978 |
cd $cpiodir |
|
1979 |
case `echo generic.root*` in |
|
1980 |
generic.root) ZFIX=""; ZCAT="cat";; |
|
1981 |
generic.root.gz) ZFIX=".gz"; ZCAT="gzip -d -c";; |
|
1982 |
generic.root.Z) ZFIX=".Z"; ZCAT="zcat";; |
|
1983 |
*) fail "generic.root missing or in unknown compression format";; |
|
1984 |
esac |
|
1985 |
||
3446 | 1986 |
# |
1987 |
# Determine what kind of archives we're installing, using the following rules: |
|
1988 |
# |
|
1989 |
# 1. If strap.com is present, the archives are pre-multiboot |
|
1990 |
# 2. If symdef is present, the archives are directboot |
|
1991 |
# 3. Otherwise, the archives are multiboot |
|
1992 |
# |
|
1993 |
if [ $target_isa = i386 ]; then |
|
1994 |
if [ -f $cpiodir/i86pc.boot$ZFIX ] && \ |
|
1995 |
archive_file_exists i86pc.boot "strap.com"; then |
|
1996 |
archive_type=dca |
|
1997 |
elif [ -f $cpiodir/i86pc.root$ZFIX ] && \ |
|
1998 |
archive_file_exists i86pc.boot symdef; then |
|
1999 |
archive_type=directboot |
|
2000 |
multi_or_direct=yes |
|
2001 |
else |
|
2002 |
archive_type=multiboot |
|
2003 |
multi_or_direct=yes |
|
2004 |
fi |
|
2005 |
fi |
|
2006 |
||
0 | 2007 |
if [ $diskless = no ]; then |
2008 |
root=${2:-/} |
|
2009 |
[[ "$root" = /* ]] || fail "root-dir must be an absolute path" |
|
2010 |
usrroot=$root |
|
2011 |
usr=${usrroot%/}/usr |
|
2012 |
rootlist=$root |
|
2013 |
||
2014 |
[[ -f $root/etc/system ]] || \ |
|
3948
b8d304c37bf9
6535942 bfu and acr don't tolerate non-native zones other than 'lx'
dp
parents:
3893
diff
changeset
|
2015 |
fail "$root/etc/system not found; nonglobal zone target not allowed" |
0 | 2016 |
|
3446 | 2017 |
if [ -f $root/boot/platform/i86pc/kernel/unix ]; then |
2018 |
failsafe_type=directboot |
|
2019 |
elif [ -f $root/boot/multiboot ]; then |
|
2020 |
failsafe_type=multiboot |
|
2021 |
fi |
|
2022 |
||
0 | 2023 |
# Make sure we extract the sun4u-us3 libc_psr.so.1 |
2024 |
if [ -d $root/platform/sun4u -a \ |
|
2025 |
! -d $root/platform/sun4u-us3 ] |
|
2026 |
then |
|
2027 |
mkdir $root/platform/sun4u-us3 |
|
2028 |
chmod 755 $root/platform/sun4u-us3 |
|
2029 |
chown root $root/platform/sun4u-us3 |
|
2030 |
chgrp sys $root/platform/sun4u-us3 |
|
2031 |
fi |
|
2032 |
||
2033 |
if [ $karch != $plat -a -f ${cpiodir}/${plat}.usr$ZFIX ]; then |
|
2034 |
usrarchs="$karch $plat" |
|
2035 |
else |
|
2036 |
usrarchs="$karch" |
|
2037 |
fi |
|
2038 |
if [ $karch != $plat -a -f ${cpiodir}/${plat}.root$ZFIX ]; then |
|
2039 |
rootarchs="$karch $plat" |
|
2040 |
else |
|
2041 |
rootarchs="$karch" |
|
2042 |
fi |
|
2043 |
||
2044 |
if [ -h ${root}/platform/${plat} ]; then |
|
2045 |
rm -f ${root}/platform/${plat} |
|
2046 |
fi |
|
2047 |
if [ -h ${usr}/platform/${plat} ]; then |
|
2048 |
rm -f ${usr}/platform/${plat} |
|
2049 |
fi |
|
2050 |
||
2051 |
if [ $plat != $karch -a -f ${cpiodir}/${plat}.root$ZFIX \ |
|
2052 |
-a -f ${cpiodir}/${plat}.usr$ZFIX ] |
|
2053 |
then |
|
2054 |
cd $cpiodir |
|
2055 |
# |
|
2056 |
# Look through all the archives we build and match |
|
2057 |
# the names of built archives with the names of |
|
2058 |
# directories installed on this machine. We assume |
|
2059 |
# here that we can get the names of all architectures |
|
2060 |
# by pattern matching the names of .root archives - so |
|
2061 |
# if we ever had a case where we had only a .usr archive |
|
2062 |
# we wouldn't find that archive. |
|
2063 |
# |
|
2064 |
for i in *.root* |
|
2065 |
do |
|
2066 |
platname=${i%.root*} |
|
2067 |
if [ -z "${platname}" -o ${platname} = $karch -o \ |
|
2068 |
$platname = generic -o ${platname} = $plat ]; then |
|
2069 |
continue; |
|
2070 |
fi |
|
2071 |
if [ -d ${root}/platform/${platname} -o \ |
|
2072 |
-h ${root}/platform/${platname} ]; then |
|
2073 |
rootarchs="${rootarchs} ${platname}" |
|
2074 |
fi |
|
2075 |
if [ -d ${usr}/platform/${platname} -o \ |
|
2076 |
-h ${usr}/platform/${platname} ]; then |
|
2077 |
usrarchs="${usrarchs} ${platname}" |
|
2078 |
fi |
|
2079 |
if [ -h ${root}/platform/${platname} ]; then |
|
2080 |
rm -f ${root}/platform/${platname} |
|
2081 |
fi |
|
2082 |
if [ -h ${usr}/platform/${platname} ]; then |
|
2083 |
rm -f ${usr}/platform/${platname} |
|
2084 |
fi |
|
2085 |
done |
|
2086 |
fi |
|
2087 |
rootslice=`df -k $root | nawk 'NR > 1 { print $1 }' | sed s/dsk/rdsk/` |
|
2088 |
print "Loading $cpiodir on $root" |
|
2089 |
else |
|
2090 |
usrroot=$2 |
|
2091 |
usr=$2/usr |
|
2092 |
[[ "$usr" = /export/exec/* ]] || fail "exec-dir $usrroot sounds bogus" |
|
2093 |
case $2 in |
|
2094 |
*sparc*) |
|
2095 |
target_isa=sparc ;; |
|
2096 |
*i386*) |
|
2097 |
target_isa=i386 ;; |
|
2098 |
esac |
|
2099 |
cd $cpiodir |
|
2100 |
test -f generic.root$ZFIX || fail "$cpiodir/generic.root$ZFIX missing" |
|
2101 |
allarchs=$(echo $(ls *.root$ZFIX | grep -v generic.root$ZFIX | \ |
|
2102 |
sed -e 's/.root.*//')) |
|
2103 |
# XXX Pick karch as last available root arch |
|
2104 |
karch=${allarchs##* } |
|
2105 |
# XXX Pick plat as first available root arch |
|
2106 |
plat=${allarchs%% *} |
|
2107 |
rootlist="" |
|
2108 |
for root in /export/root/* |
|
2109 |
do |
|
2110 |
test -f $root/etc/vfstab && |
|
2111 |
egrep -s $usrroot $root/etc/vfstab && |
|
2112 |
rootlist="$rootlist $root" |
|
2113 |
done |
|
2114 |
test -n "$rootlist" || fail "no clients to upgrade" |
|
2115 |
print "Loading $cpiodir usr archives on:\n\t$usr\n" |
|
2116 |
print "Loading $cpiodir root archives on:" |
|
2117 |
for root in $rootlist |
|
2118 |
do |
|
2119 |
print "\t$root" |
|
2120 |
done |
|
2121 |
fi |
|
2122 |
||
2123 |
nss_lib="$usr/lib/mps/libnss3.so" |
|
2124 |
nss_lib64="$usr/lib/mps/64/libnss3.so" |
|
2125 |
valid_rpath="\$ORIGIN:/usr/lib/mps/secv1:/usr/lib/mps" |
|
3529
99c1b84dcfe9
6519951 bfu is just another word for exit today (RPATH -> RUNPATH conversion bites us)
rie
parents:
3479
diff
changeset
|
2126 |
rpath_msg="R(UN)?PATH from file ${nss_lib}\)" |
0 | 2127 |
if [ ! -x /usr/bin/ldd ]; then |
2128 |
if [ "$force_override" = yes ]; then |
|
2129 |
echo "/usr/bin/ldd is missing but -f is set; continuing." |
|
2130 |
else |
|
2131 |
echo "/usr/bin/ldd is missing." |
|
2132 |
fail "Install the SUNWtoo package." |
|
2133 |
fi |
|
2134 |
fi |
|
3529
99c1b84dcfe9
6519951 bfu is just another word for exit today (RPATH -> RUNPATH conversion bites us)
rie
parents:
3479
diff
changeset
|
2135 |
nss_rpath=`ldd -s $nss_lib | egrep "$rpath_msg" | head -1 | cut -d'=' -f2 | \ |
0 | 2136 |
awk '{print $1}'` |
2137 |
update_script="/ws/onnv-gate/public/bin/update_nsspkgs" |
|
2138 |
if [ $valid_rpath != "$nss_rpath" ]; then |
|
2139 |
if [ "$force_override" = yes ]; then |
|
2140 |
echo "$nss_lib is not valid but -f is set; continuing." |
|
2141 |
else |
|
2142 |
echo "$nss_lib is not valid." |
|
2143 |
fail "Run $update_script to update the SUNWtls package." |
|
2144 |
fi |
|
2145 |
fi |
|
2146 |
if [ $target_isa = i386 -a ! -f $nss_lib64 ]; then |
|
2147 |
echo "$nss_lib64 does not exist." |
|
2148 |
fail "Run $update_script to update the NSS packages." |
|
2149 |
fi |
|
2150 |
||
2151 |
update_script="/ws/onnv-gate/public/bin/migrate_bind9" |
|
2152 |
if [[ ! -f $usr/lib/dns/libdns.so ]] && ! $ZCAT $cpiodir/generic.usr$ZFIX | \ |
|
2153 |
cpio -it 2>/dev/null | egrep -s '^usr/sbin/ndc' ; then |
|
2154 |
if [ "$force_override" = yes ]; then |
|
2155 |
echo "BIND 9 has not been installed, but -f is set; continuing." |
|
2156 |
else |
|
2157 |
echo "BIND 8 has been removed from ON; BIND 9 is available from SFW." |
|
2158 |
fail "Run $update_script to migrate to BIND 9." |
|
2159 |
fi |
|
2160 |
fi |
|
2161 |
||
2162 |
update_script="/ws/onnv-gate/public/bin/update_ce" |
|
741
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
693
diff
changeset
|
2163 |
if ifconfig -a | egrep '^ce' >/dev/null 2>/dev/null; then |
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
693
diff
changeset
|
2164 |
# CE version 1.148 or later is required |
0 | 2165 |
cever=`modinfo | grep 'CE Ethernet' | sed 's/.*v1\.//' | tr -d ')' | \ |
741
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
693
diff
changeset
|
2166 |
nawk '{ if ($1 < 148) print "BAD"; else print $1 }'` |
0 | 2167 |
if [ "$cever" = "BAD" ]; then |
2168 |
fail "You must run $update_script to upgrade your ce driver." |
|
2169 |
fi |
|
2170 |
fi |
|
2171 |
||
2912
85ea316d9c18
PSARC 2005/399 Tamarack: Removable Media Enhancements in Solaris
artem
parents:
2866
diff
changeset
|
2172 |
update_script="/ws/onnv-gate/public/bin/update_dbus" |
2919 | 2173 |
if [ ! -x $usr/lib/dbus-daemon ]; then |
2912
85ea316d9c18
PSARC 2005/399 Tamarack: Removable Media Enhancements in Solaris
artem
parents:
2866
diff
changeset
|
2174 |
fail "Run $update_script to update D-Bus." |
85ea316d9c18
PSARC 2005/399 Tamarack: Removable Media Enhancements in Solaris
artem
parents:
2866
diff
changeset
|
2175 |
fi |
85ea316d9c18
PSARC 2005/399 Tamarack: Removable Media Enhancements in Solaris
artem
parents:
2866
diff
changeset
|
2176 |
|
3446 | 2177 |
# |
2178 |
# We need biosdev if we're moving from pre-multiboot to multiboot or directboot |
|
2179 |
# kernels. |
|
2180 |
# |
|
2181 |
if [ $target_isa = i386 ] && [ $multi_or_direct = yes ] && [ $diskless = no ] |
|
2182 |
then |
|
0 | 2183 |
prtconf -v | grep biosdev >/dev/null 2>&1 |
2866
c4183dac96f1
PSARC 2006/340 Solaris Boot Support for EFI and LinuxBIOS
szhou
parents:
2805
diff
changeset
|
2184 |
if [ $? -ne 0 ] && [ ! -f $rootprefix/platform/i86pc/multiboot ]; then |
0 | 2185 |
echo "biosdev cannot be run on this machine." |
2186 |
echo "Transitioning from classic to multiboot requires a" |
|
2187 |
echo "bootconf which is compatible with biosdev." |
|
2188 |
echo "bfu to onnv_12 first, then to a build with multiboot." |
|
2189 |
fail "" |
|
2190 |
fi |
|
2191 |
fi |
|
2192 |
||
305 | 2193 |
if $ZCAT $cpiodir/generic.root$ZFIX | cpio -it 2>/dev/null | \ |
2194 |
grep datalink.conf > /dev/null 2>&1 ; then |
|
2195 |
need_datalink=yes |
|
2196 |
fi |
|
2197 |
||
3147 | 2198 |
# |
2199 |
# Check whether the archives have an etc/dladm directory; this is |
|
2200 |
# later used to determine if aggregation.conf needs to be moved. |
|
2201 |
# |
|
2202 |
if $ZCAT $cpiodir/generic.root$ZFIX | cpio -it 2>/dev/null | \ |
|
2203 |
grep etc/dladm > /dev/null 2>&1 ; then |
|
2204 |
new_dladm=yes |
|
2205 |
fi |
|
2206 |
||
0 | 2207 |
time_ref=/tmp/bfu.time_ref.$$ |
2208 |
rm -f $time_ref |
|
2209 |
touch $time_ref || fail "$time_ref: Unable to create time reference." |
|
2210 |
time_ref_seconds=$SECONDS |
|
2211 |
||
2212 |
print "\nCreating bfu execution environment ..." |
|
2213 |
||
2214 |
# |
|
2215 |
# Save off a few critical libraries and commands, so that bfu will |
|
2216 |
# continue to function properly even in the face of major |
|
2217 |
# kernel/library/command incompatibilities during a live upgrade. |
|
2218 |
# |
|
2219 |
bfucmd=" |
|
2220 |
/usr/bin/awk |
|
2221 |
/usr/bin/cat |
|
2222 |
/usr/bin/chgrp |
|
2223 |
/usr/bin/chmod |
|
2224 |
/usr/bin/chown |
|
2225 |
/usr/bin/cmp |
|
2226 |
/usr/bin/cp |
|
2227 |
/usr/bin/cpio |
|
2228 |
/usr/bin/csh |
|
2229 |
/usr/bin/cut |
|
2230 |
/usr/bin/date |
|
2231 |
/usr/bin/dd |
|
2232 |
/usr/bin/df |
|
2233 |
/usr/bin/diff |
|
2234 |
/usr/bin/du |
|
2235 |
/usr/bin/echo |
|
2236 |
/usr/bin/ed |
|
2237 |
/usr/bin/egrep |
|
2238 |
/usr/bin/env |
|
2239 |
/usr/bin/ex |
|
2240 |
/usr/bin/expr |
|
2241 |
/usr/bin/false |
|
2242 |
/usr/bin/fgrep |
|
2243 |
/usr/bin/file |
|
2244 |
/usr/bin/find |
|
2245 |
/usr/bin/gettext |
|
2246 |
/usr/bin/grep |
|
2247 |
/usr/bin/head |
|
2248 |
/usr/bin/id |
|
2249 |
/usr/bin/ksh |
|
2250 |
/usr/bin/line |
|
2251 |
/usr/bin/ln |
|
2252 |
/usr/bin/ls |
|
2253 |
/usr/bin/mkdir |
|
2254 |
/usr/bin/mktemp |
|
2255 |
/usr/bin/more |
|
2256 |
/usr/bin/mv |
|
2257 |
/usr/bin/nawk |
|
2258 |
/usr/bin/pgrep |
|
2259 |
/usr/bin/pkginfo |
|
2260 |
/usr/bin/pkill |
|
2261 |
/usr/bin/printf |
|
2262 |
/usr/bin/ps |
|
2263 |
/usr/bin/ptree |
|
2264 |
/usr/bin/rm |
|
2265 |
/usr/bin/rmdir |
|
2266 |
/usr/bin/sed |
|
2267 |
/usr/bin/sh |
|
2268 |
/usr/bin/sleep |
|
2269 |
/usr/bin/sort |
|
2270 |
/usr/bin/strings |
|
2271 |
/usr/bin/stty |
|
2272 |
/usr/bin/su |
|
2273 |
/usr/bin/sum |
|
2274 |
/usr/bin/tail |
|
2275 |
/usr/bin/tee |
|
2276 |
/usr/bin/touch |
|
2277 |
/usr/bin/tr |
|
2278 |
/usr/bin/true |
|
2279 |
/usr/bin/truss |
|
2280 |
/usr/bin/tty |
|
2281 |
/usr/bin/uname |
|
2282 |
/usr/bin/uniq |
|
2283 |
/usr/bin/uptime |
|
2284 |
/usr/bin/vi |
|
2285 |
/usr/bin/w |
|
2286 |
/usr/bin/wc |
|
2287 |
/usr/bin/xargs |
|
2288 |
/usr/bin/zcat |
|
1872 | 2289 |
/usr/sbin/add_drv |
0 | 2290 |
/usr/sbin/chroot |
2291 |
/usr/sbin/halt |
|
2292 |
/usr/sbin/lockfs |
|
1872 | 2293 |
/usr/sbin/lofiadm |
2294 |
/usr/sbin/mkfile |
|
2295 |
/usr/sbin/mkfs |
|
0 | 2296 |
/usr/sbin/mknod |
1872 | 2297 |
/usr/sbin/mount |
2298 |
/usr/sbin/newfs |
|
0 | 2299 |
/usr/sbin/pkgrm |
1872 | 2300 |
/usr/sbin/prtconf |
0 | 2301 |
/usr/sbin/reboot |
2302 |
/usr/sbin/sync |
|
2303 |
/usr/sbin/tar |
|
2304 |
/usr/sbin/uadmin |
|
1872 | 2305 |
/usr/sbin/umount |
0 | 2306 |
/usr/sbin/wall |
1872 | 2307 |
/usr/sbin/zonecfg |
0 | 2308 |
${FASTFS-$GATE/public/bin/$bfu_isa/fastfs} |
2309 |
${GZIPBIN-$GATE/public/bin/$bfu_isa/gzip} |
|
2310 |
" |
|
2311 |
||
997 | 2312 |
# |
2313 |
# Scripts needed by BFU. These must be modified to use the interpreters in |
|
2314 |
# /tmp/bfubin. The interpreters in /usr/bin may not be compatible with the |
|
2315 |
# libraries in the archives being extracted. |
|
2316 |
# |
|
2317 |
bfuscr=" |
|
2318 |
${ACR-${GATE}/public/bin/acr} |
|
2319 |
" |
|
2320 |
||
2321 |
# |
|
2322 |
# basename and dirname may be ELF executables, not shell scripts; |
|
2323 |
# make sure they go into the right list. |
|
2324 |
# |
|
2325 |
if `file /usr/bin/basename | grep ELF >/dev/null` |
|
2326 |
then bfucmd="$bfucmd /usr/bin/basename" |
|
2327 |
else bfuscr="$bfuscr /usr/bin/basename" |
|
2328 |
fi |
|
2329 |
||
2330 |
if `file /usr/bin/dirname | grep ELF >/dev/null` |
|
2331 |
then bfucmd="$bfucmd /usr/bin/dirname" |
|
2332 |
else bfuscr="$bfuscr /usr/bin/dirname" |
|
2333 |
fi |
|
2334 |
||
0 | 2335 |
rm -rf /tmp/bfubin |
2336 |
mkdir /tmp/bfubin |
|
2337 |
set $bfucmd |
|
2338 |
isalist=`isalist` |
|
2339 |
while [ $# -gt 0 ] |
|
2340 |
do |
|
2341 |
dir=${1%/*} |
|
2342 |
cmd=${1##*/} |
|
2343 |
cd $dir |
|
2344 |
isacmd=`(find $isalist -name $cmd 2>/dev/null; echo $cmd) | head -1` |
|
2345 |
cp $dir/$isacmd /tmp/bfubin || fail "cannot copy $dir/$isacmd" |
|
2346 |
shift |
|
2347 |
done |
|
2348 |
||
2349 |
# |
|
2350 |
# Optional commands. We warn, but do not abort, if we are crossing a |
|
2351 |
# feature boundary (where a command is not present in the parent). |
|
2352 |
# Clauses requiring these commands must explicitly test for their |
|
2353 |
# presence in /tmp/bfubin. |
|
2354 |
# |
|
2355 |
bfuoptcmd=" |
|
2356 |
/sbin/biosdev |
|
2357 |
/sbin/bootadm |
|
2358 |
/sbin/installgrub |
|
2359 |
/usr/sbin/fdisk |
|
2360 |
/usr/sbin/metastat |
|
2361 |
/usr/bin/mkisofs |
|
2362 |
/usr/sbin/svcadm |
|
2363 |
/usr/sbin/svccfg |
|
2364 |
/usr/bin/svcprop |
|
2365 |
" |
|
2366 |
||
2367 |
set $bfuoptcmd |
|
2368 |
isalist=`isalist` |
|
2369 |
while [ $# -gt 0 ] |
|
2370 |
do |
|
2371 |
dir=${1%/*} |
|
2372 |
cmd=${1##*/} |
|
2373 |
cd $dir |
|
2374 |
isacmd=`(find $isalist -name $cmd 2>/dev/null; echo $cmd) | head -1` |
|
2375 |
cp $dir/$isacmd /tmp/bfubin 2>/dev/null |
|
2376 |
shift |
|
2377 |
done |
|
2378 |
||
2379 |
# |
|
3446 | 2380 |
# set up installgrub and friends if transitioning to multiboot or directboot |
0 | 2381 |
# do this now so ldd can determine library dependencies |
2382 |
# |
|
3446 | 2383 |
# We split the binaries into two groups: the type where we want to make any |
2384 |
# effort to get the newest version (like symdef and bootadm), and the type |
|
2385 |
# where any old version will do (like installgrub and biosdev). |
|
2386 |
# |
|
2387 |
# If we're bfu'ing across the directboot/multiboot boundary, we need the new |
|
2388 |
# bootadm and symdef to properly handle menu.lst changes. If the system is |
|
2389 |
# directboot, we can use the local copies. If the system is multiboot but |
|
2390 |
# the archives are directboot, we extract the binaries early. Otherwise, |
|
2391 |
# we're not crossing the boundary, and which one we use doesn't matter. |
|
2392 |
# |
|
2393 |
# NB - if bootadm or symdef is ever changed to require a new library, the |
|
2394 |
# early extraction will blow up horribly. |
|
2395 |
# |
|
2396 |
# For testing purposes, a user can set DIRECTBOOT_BIN_DIR in the environment, |
|
2397 |
# and we'll use that instead. |
|
2398 |
# |
|
0 | 2399 |
MULTIBOOT_BIN_DIR=${MULTIBOOT_BIN_DIR:=${GATE}/public/multiboot} |
3446 | 2400 |
have_new_bootadm=unknown |
2401 |
||
2402 |
if [ -x $root/boot/solaris/bin/symdef ] && \ |
|
2403 |
$root/boot/solaris/bin/symdef $root/platform/i86pc/kernel/unix dboot_image |
|
2404 |
then |
|
2405 |
root_is_directboot=yes |
|
2406 |
else |
|
2407 |
root_is_directboot=no |
|
2408 |
fi |
|
2409 |
||
2410 |
# |
|
2411 |
# A comma-separated list of the command and the archive it's in |
|
2412 |
# |
|
2413 |
multiboot_new_cmds=" |
|
2414 |
sbin/bootadm,generic.sbin |
|
2415 |
boot/solaris/bin/symdef,i86pc.boot |
|
2416 |
" |
|
2417 |
||
2418 |
if [ $multi_or_direct = yes ]; then |
|
2419 |
for line in $multiboot_new_cmds |
|
2420 |
do |
|
2421 |
cmd=${line%,*} |
|
2422 |
file=${cmd##*/} |
|
2423 |
archive=${line#*,} |
|
2424 |
if [ -n "$DIRECTBOOT_BIN_DIR" ] && \ |
|
2425 |
[ -f $DIRECTBOOT_BIN_DIR/$file ]; then |
|
2426 |
cp $DIRECTBOOT_BIN_DIR/$file /tmp/bfubin/ |
|
2427 |
else |
|
2428 |
if [ $root_is_directboot = yes ]; then |
|
2429 |
cp $root/$cmd /tmp/bfubin/ |
|
2430 |
have_new_bootadm=yes |
|
2431 |
elif [ $archive_type = directboot ]; then |
|
2432 |
DBOOT_TMPDIR=/tmp/dboot.$$ |
|
2433 |
trap "rm -rf $DBOOT_TMPDIR" EXIT |
|
2434 |
OLD_PWD=$(pwd) |
|
2435 |
rm -rf $DBOOT_TMPDIR |
|
2436 |
mkdir $DBOOT_TMPDIR |
|
2437 |
cd $DBOOT_TMPDIR |
|
2438 |
$ZCAT $cpiodir/${archive}$ZFIX | \ |
|
2439 |
cpio -id "$cmd" 2>/dev/null |
|
2440 |
if [ -x $cmd ]; then |
|
2441 |
cp $cmd /tmp/bfubin/ |
|
2442 |
have_new_bootadm=yes |
|
2443 |
fi |
|
2444 |
cd $OLD_PWD |
|
2445 |
rm -rf $DBOOT_TMPDIR |
|
2446 |
trap - EXIT |
|
2447 |
fi |
|
2448 |
fi |
|
2449 |
||
2450 |
# |
|
2451 |
# If all else fails, grab the local version |
|
2452 |
# |
|
2453 |
if [ ! -x /tmp/bfubin/$file ]; then |
|
2454 |
[ -x /$cmd ] && cp /$cmd /tmp/bfubin |
|
2455 |
fi |
|
2456 |
done |
|
2457 |
fi |
|
0 | 2458 |
|
2459 |
multiboot_cmds=" |
|
2460 |
/sbin/biosdev |
|
2461 |
/sbin/installgrub |
|
2462 |
" |
|
2463 |
copying_mboot_cmds=no |
|
3446 | 2464 |
if [ $multi_or_direct = yes ]; then |
0 | 2465 |
for cmd in $multiboot_cmds |
2466 |
do |
|
3446 | 2467 |
file=`basename $cmd` |
0 | 2468 |
if [ -f $cmd ]; then |
2469 |
cp $cmd /tmp/bfubin |
|
3446 | 2470 |
elif [ -n "$DIRECTBOOT_BIN_DIR" ] && |
2471 |
[ -d $DIRECTBOOT_BIN_DIR ] && |
|
2472 |
[ -x $DIRECTBOOT_BIN_DIR/$file ]; then |
|
2473 |
cp $DIRECTBOOT_BIN_DIR/$file /tmp/bfubin/ |
|
0 | 2474 |
else |
2475 |
if [ ! -d $MULTIBOOT_BIN_DIR ]; then |
|
2476 |
echo "$MULTIBOOT_BIN_DIR: not found" |
|
2477 |
elif [ ! -f $MULTIBOOT_BIN_DIR/$file ]; then |
|
2478 |
echo "$MULTIBOOT_BIN_DIR/$file: not found" |
|
2479 |
fi |
|
2480 |
if [ $copying_mboot_cmds = no ]; then |
|
2481 |
echo "installing files from $MULTIBOOT_BIN_DIR" |
|
2482 |
copying_mboot_cmds=yes |
|
2483 |
fi |
|
2484 |
cp $MULTIBOOT_BIN_DIR/$file /tmp/bfubin |
|
2485 |
fi |
|
2486 |
||
2487 |
done |
|
2488 |
fi |
|
2489 |
||
2490 |
# |
|
2491 |
# If available, use ldd to determine which libraries bfu depends on. |
|
2492 |
# Otherwise, just make an educated guess. |
|
2493 |
# |
|
2494 |
if [ -x /usr/bin/ldd ]; then |
|
2495 |
bfulib="`ldd /tmp/bfubin/* | nawk '$3 ~ /lib/ { print $3 }' | sort -u`" |
|
2496 |
else |
|
2497 |
bfulib=" |
|
2498 |
/lib/libc.so.1 |
|
2499 |
/lib/libm.so.2 |
|
2500 |
/lib/libdoor.so.1 |
|
2501 |
/lib/libm.so.2 |
|
2502 |
/lib/libmd5.so.1 |
|
2503 |
/lib/libnvpair.so.1 |
|
2504 |
/lib/libscf.so.1 |
|
2505 |
/lib/libuutil.so.1 |
|
2506 |
/usr/lib/libbsm.so.1 |
|
2507 |
/usr/lib/libc2.so |
|
2508 |
/usr/lib/libdl.so.1 |
|
2509 |
/usr/lib/libelf.so.1 |
|
2510 |
/usr/lib/libkstat.so.1 |
|
2511 |
/usr/lib/libmapmalloc.so.1 |
|
2512 |
/usr/lib/libmp.so.1 |
|
2513 |
/usr/lib/libnsl.so.1 |
|
2514 |
/usr/lib/libpam.so.1 |
|
2515 |
/usr/lib/libsec.so.1 |
|
2516 |
/usr/lib/libsocket.so.1 |
|
2517 |
/usr/lib/libtecla.so.1 |
|
2518 |
" |
|
2519 |
fi |
|
2520 |
||
2521 |
# add dlopen()'ed stuff |
|
2522 |
bfulib=" |
|
2523 |
$bfulib |
|
2524 |
/lib/ld.so.1 |
|
2525 |
/usr/lib/nss_* |
|
2526 |
" |
|
2527 |
||
598
62a3fdbde968
6327152 bfuing over the fix for 6324631 can cause BFU/acr failures
jwadams
parents:
461
diff
changeset
|
2528 |
# add libc_psr.so.1, if available and not empty |
62a3fdbde968
6327152 bfuing over the fix for 6324631 can cause BFU/acr failures
jwadams
parents:
461
diff
changeset
|
2529 |
if [ -s /platform/`uname -i`/lib/libc_psr.so.1 ]; then |
62a3fdbde968
6327152 bfuing over the fix for 6324631 can cause BFU/acr failures
jwadams
parents:
461
diff
changeset
|
2530 |
bfulib=" |
62a3fdbde968
6327152 bfuing over the fix for 6324631 can cause BFU/acr failures
jwadams
parents:
461
diff
changeset
|
2531 |
$bfulib |
62a3fdbde968
6327152 bfuing over the fix for 6324631 can cause BFU/acr failures
jwadams
parents:
461
diff
changeset
|
2532 |
/platform/`uname -i`/lib/libc_psr.so.1 |
62a3fdbde968
6327152 bfuing over the fix for 6324631 can cause BFU/acr failures
jwadams
parents:
461
diff
changeset
|
2533 |
" |
62a3fdbde968
6327152 bfuing over the fix for 6324631 can cause BFU/acr failures
jwadams
parents:
461
diff
changeset
|
2534 |
fi |
62a3fdbde968
6327152 bfuing over the fix for 6324631 can cause BFU/acr failures
jwadams
parents:
461
diff
changeset
|
2535 |
|
0 | 2536 |
rm -rf /tmp/bfulib /tmp/bl |
2537 |
mkdir /tmp/bfulib /tmp/bl |
|
2538 |
||
2539 |
# |
|
2540 |
# Create 64 bit directory structure and determine 64 bit arch name. |
|
2541 |
# |
|
2542 |
if [ -h /usr/lib/64 ] |
|
2543 |
then |
|
2544 |
link=`ls -dl /usr/lib/64 | awk '{print $NF}'` |
|
2545 |
ln -s $link /tmp/bfulib/64 |
|
2546 |
ln -s $link /tmp/bl/64 |
|
2547 |
mkdir /tmp/bfulib/$link /tmp/bl/$link |
|
2548 |
bfulib="$bfulib /usr/lib/64/nss_*" |
|
2549 |
# |
|
2550 |
# Copy libraries to proper directories |
|
2551 |
# |
|
2552 |
for lib in $bfulib |
|
2553 |
do |
|
2554 |
case $lib in |
|
2555 |
*/64/* | */$link/*) |
|
2556 |
cp $lib /tmp/bfulib/64;; |
|
2557 |
*) |
|
2558 |
cp $lib /tmp/bfulib;; |
|
2559 |
esac |
|
2560 |
done |
|
2561 |
# |
|
2562 |
# Private 64 bit runtime linker. |
|
2563 |
# |
|
2564 |
cp /lib/64/ld.so.1 /tmp/bfulib/64/bf.1 |
|
2565 |
cp /lib/64/ld.so.1 /tmp/bl/64/bf.1 |
|
2566 |
else |
|
2567 |
cp $bfulib /tmp/bfulib |
|
2568 |
fi |
|
2569 |
cp /lib/ld.so.1 /tmp/bfulib/bf.1 # bfu's private runtime linker |
|
2570 |
cp /lib/ld.so.1 /tmp/bl/bf.1 |
|
2571 |
||
2572 |
${BFULD-$GATE/public/bin/$bfu_isa/bfuld} /tmp/bfubin/* || fail "bfuld failed" |
|
2573 |
||
2574 |
for x in $bfuscr |
|
2575 |
do |
|
2576 |
sed -e 's/\/usr\/bin\//\/tmp\/bfubin\//g' \ |
|
2577 |
-e 's/\/bin\//\/tmp\/bfubin\//g' < $x > /tmp/bfubin/`basename $x` |
|
2578 |
chmod +x /tmp/bfubin/`basename $x` |
|
2579 |
done |
|
2580 |
||
2581 |
# |
|
2582 |
# scripts used together with multiboot |
|
2583 |
# |
|
2584 |
multiboot_scr=" |
|
2585 |
/boot/solaris/bin/create_ramdisk |
|
2586 |
/boot/solaris/bin/create_diskmap |
|
2587 |
/boot/solaris/bin/root_archive |
|
2588 |
" |
|
2589 |
||
3446 | 2590 |
if [ $multi_or_direct = yes ]; then |
0 | 2591 |
for cmd in $multiboot_scr |
2592 |
do |
|
3446 | 2593 |
file=`basename $cmd` |
0 | 2594 |
if [ -f $cmd ]; then |
2595 |
cp $cmd /tmp/bfubin |
|
2596 |
else |
|
2597 |
if [ ! -d $MULTIBOOT_BIN_DIR ]; then |
|
2598 |
echo "$MULTIBOOT_BIN_DIR: not found" |
|
2599 |
fail "" |
|
2600 |
fi |
|
2601 |
||
2602 |
if [ ! -f $MULTIBOOT_BIN_DIR/$file ]; then |
|
2603 |
echo "$MULTIBOOT_BIN_DIR/$file: not found" |
|
2604 |
fail "" |
|
2605 |
fi |
|
2606 |
echo "copying $file from $MULTIBOOT_BIN_DIR" |
|
2607 |
cp $MULTIBOOT_BIN_DIR/$file /tmp/bfubin |
|
2608 |
fi |
|
2609 |
||
3446 | 2610 |
# |
2611 |
# We do two substitutions here to replace references to |
|
2612 |
# both /usr/bin/ and /bin/ with /tmp/bfubin/ |
|
2613 |
# |
|
0 | 2614 |
mv /tmp/bfubin/${file} /tmp/bfubin/${file}- |
3446 | 2615 |
sed -e 's/\/usr\/bin\//\/tmp\/bfubin\//g' \ |
2616 |
-e 's/\/bin\//\/tmp\/bfubin\//g' \ |
|
0 | 2617 |
< /tmp/bfubin/${file}- > /tmp/bfubin/${file} |
2618 |
chmod +x /tmp/bfubin/${file} |
|
2619 |
done |
|
2620 |
fi |
|
2621 |
||
305 | 2622 |
create_datalink_conf() |
2623 |
{ |
|
2624 |
# /etc/datalink.conf needs to be populated. |
|
744 | 2625 |
drivers="bge rge xge" |
305 | 2626 |
conf=$rootprefix/etc/datalink.conf |
2627 |
||
2628 |
if [ ! -f $conf ]; then |
|
2629 |
# nothing to do if we bfu'ed from an archive that doesn't |
|
2630 |
# provide /etc/datalink.conf |
|
2631 |
return |
|
2632 |
fi |
|
2633 |
||
2634 |
ls -1 $rootprefix/etc | egrep -e '^hostname.|^hostname6.|^dhcp.' | \ |
|
2635 |
cut -d . -f2 | sort -u > /tmp/ifnames.$$ |
|
2636 |
||
2637 |
for driver in $drivers |
|
2638 |
do |
|
2639 |
grep $driver /tmp/ifnames.$$ | \ |
|
2640 |
while read ifname |
|
2641 |
do |
|
2642 |
devnum=`echo $ifname | sed "s/$driver//g"` |
|
2643 |
if [ "$driver$devnum" != $ifname -o \ |
|
2644 |
-n "`echo $devnum | tr -d '[0-9]'`" ]; then |
|
2645 |
echo "skipping invalid interface $ifname" |
|
2646 |
continue |
|
2647 |
fi |
|
2648 |
||
2649 |
vid=`expr $devnum / 1000` |
|
2650 |
inst=`expr $devnum % 1000` |
|
2651 |
||
2652 |
awk '{ print $1 }' $conf | grep $ifname > /dev/null |
|
2653 |
if [ $? -ne 0 ]; then |
|
2654 |
# An entry for that interface does not exist |
|
2655 |
printf \ |
|
2656 |
"$ifname\t$driver$inst\t0\t$vid\n" \ |
|
2657 |
>> $conf |
|
2658 |
fi |
|
2659 |
done |
|
2660 |
done |
|
2661 |
||
2662 |
rm -f /tmp/ifnames.$$ |
|
2663 |
} |
|
2664 |
||
2311 | 2665 |
revert_aggregation_conf() |
2666 |
{ |
|
2667 |
aggrconf=$rootprefix/etc/aggregation.conf |
|
2668 |
nawk ' |
|
2479
8a306e868728
6453157 missing initialization of from_new_aggrconf variable in bfu.sh
seb
parents:
2385
diff
changeset
|
2669 |
/^[ \t]*#/ || /^[ \t]*$/ || $4 ~ "/0" { |
2311 | 2670 |
print; |
2671 |
next; |
|
2672 |
} |
|
2673 |
||
2674 |
{ |
|
2675 |
OFS="\t"; |
|
2676 |
gsub(/[^,]*/, "&/0", $4); |
|
2677 |
print; |
|
2678 |
}' $aggrconf > $aggrconf.bfutmp |
|
2679 |
mv -f $aggrconf.bfutmp $aggrconf |
|
2680 |
} |
|
2681 |
||
0 | 2682 |
remove_initd_links() |
2683 |
{ |
|
2684 |
# If we're delivering a new version of an existing /etc/init.d script, |
|
2685 |
# remove all hard links to the existing file in /etc/rc?.d whose |
|
2686 |
# names begin with [SK][0-9][0-9]. Additionally, in case an S or K |
|
2687 |
# file was previously delivered as a symbolic link or the hard link |
|
2688 |
# was broken, remove any file in /etc/rc?.d whose name is |
|
2689 |
# [SK][0-9][0-9] followed by the basename of the file we're going |
|
2690 |
# to update in /etc/init.d. |
|
2691 |
||
2692 |
print "Removing init.d links ... \c" |
|
2693 |
scripts=`$ZCAT $cpiodir/generic.root$ZFIX | |
|
2694 |
cpio -it 2>/dev/null | grep '^etc/init\.d/'` |
|
2695 |
if [ -n "$scripts" ]; then |
|
2696 |
inodes=`ls -li $scripts 2>/dev/null | \ |
|
2697 |
nawk '{ print "-inum " $1 " -o " }'` |
|
2698 |
names=`ls -1 $scripts 2>/dev/null | \ |
|
2699 |
nawk -F/ '{ print "-name [SK][0-9][0-9]" $NF }'` |
|
2700 |
find etc/rc?.d \( $inodes $names \) -print | xargs rm -f |
|
2701 |
fi |
|
2702 |
print "done." |
|
2703 |
} |
|
2704 |
||
2705 |
# |
|
2706 |
# Remove the old 5.005_03 version of perl. |
|
2707 |
# |
|
2708 |
remove_perl_500503() |
|
2709 |
{ |
|
2710 |
# Packages to remove. |
|
2711 |
typeset -r perl_pkgs='SUNWopl5m SUNWopl5p SUNWopl5u' |
|
2712 |
typeset -r pkgroot=${rootprefix:+-R $rootprefix} |
|
2713 |
typeset pkg |
|
2714 |
||
2715 |
# |
|
2716 |
# First, attempt to remove the packages cleanly if possible. |
|
2717 |
# |
|
2718 |
printf 'Removing perl 5.005_03 packages' |
|
2719 |
for pkg in $perl_pkgs |
|
2720 |
do |
|
2721 |
if pkginfo $pkgroot -q $pkg; then |
|
2722 |
printf ' %s' $pkg |
|
2723 |
pkgrm $pkgroot -n $pkg >/dev/null 2>&1 |
|
2724 |
fi |
|
2725 |
done |
|
2726 |
printf '\n' |
|
2727 |
||
2728 |
# |
|
2729 |
# In case that didn't work, do it manually. |
|
2730 |
# |
|
2731 |
printf 'Removing perl 5.005_03 from %s/var/sadm/install/contents' \ |
|
2732 |
$rootprefix |
|
2733 |
for pkg in $PKGS |
|
2734 |
do |
|
2735 |
printf ' %s' $pkg |
|
2736 |
if [ -d $rootprefix/var/sadm/pkg/$pkg ]; then |
|
2737 |
rm -rf $rootprefix/var/sadm/pkg/$pkg |
|
2738 |
grep -vw $pkg $rootprefix/var/sadm/install/contents > \ |
|
2739 |
/tmp/contents.$$ |
|
2740 |
cp /tmp/contents.$$ /var/sadm/install/contents.$$ |
|
2741 |
rm /tmp/contents.$$ |
|
2742 |
fi |
|
2743 |
done |
|
2744 |
printf '\n' |
|
2745 |
||
2746 |
# |
|
2747 |
# Remove any remaining 5.005_03 files, |
|
2748 |
# |
|
2749 |
printf 'Removing perl 5.005_03 from %s/perl5\n' $usr |
|
2750 |
||
2751 |
# Directories. |
|
2752 |
rm -rf $usr/perl5/5.00503 |
|
2753 |
rm -rf $usr/perl5/site_perl/5.005 |
|
2754 |
} |
|
2755 |
||
2756 |
# |
|
1433 | 2757 |
# Remove ASET |
2758 |
# |
|
2759 |
remove_eof_aset() |
|
2760 |
{ |
|
2761 |
# Packages to remove |
|
2762 |
typeset -r aset_pkgs='SUNWast' |
|
2763 |
typeset -r pkgroot=${rootprefix:+-R $rootprefix} |
|
2764 |
typeset pkg |
|
2765 |
||
2766 |
printf 'Removing ASET... ' |
|
2767 |
||
2768 |
# |
|
2769 |
# First, attempt to remove the packages cleanly if possible. |
|
2770 |
# |
|
2771 |
for pkg in $aset_pkgs |
|
2772 |
do |
|
2773 |
if pkginfo $pkgroot -q $pkg; then |
|
2774 |
printf ' %s' $pkg |
|
2775 |
pkgrm $pkgroot -n $pkg >/dev/null 2>&1 |
|
2776 |
fi |
|
2777 |
done |
|
2778 |
printf '\n' |
|
2779 |
||
2780 |
# |
|
2781 |
# In case that didn't work, do it manually. |
|
2782 |
# Remove ASET from $rootprefix/var/sadm/install/contents |
|
2783 |
# |
|
2784 |
for pkg in $aset_pkgs |
|
2785 |
do |
|
2786 |
if [ -d $rootprefix/var/sadm/pkg/$pkg ]; then |
|
2787 |
rm -rf $rootprefix/var/sadm/pkg/$pkg |
|
2788 |
grep -vw $pkg $rootprefix/var/sadm/install/contents > \ |
|
2789 |
/tmp/contents.$$ |
|
2790 |
cp /tmp/contents.$$ $rootprefix/var/sadm/install/contents.$$ |
|
2791 |
rm /tmp/contents.$$ |
|
2792 |
fi |
|
2793 |
done |
|
2794 |
||
2795 |
# |
|
2796 |
# Cleanup any remaining ASET files, symlinks, and directories. |
|
2797 |
# |
|
2798 |
rm -rf $usr/aset |
|
2799 |
} |
|
2800 |
||
2801 |
# |
|
0 | 2802 |
# Remove BIND 8 named server/tools packages |
2803 |
# |
|
2804 |
remove_eof_bind8() |
|
2805 |
{ |
|
2806 |
# Packages to remove |
|
2807 |
typeset -r bind8_pkg='SUNWinamd' |
|
2808 |
typeset -r pkgroot=${rootprefix:+-R $rootprefix} |
|
2809 |
typeset pkg |
|
2810 |
||
2811 |
printf 'Removing BIND 8 named server/tools... ' |
|
2812 |
||
2813 |
# |
|
2814 |
# We cann't pkgrm SUNWinamd at this time as the BIND 9 binaries are |
|
2815 |
# already in /usr/sbin. |
|
2816 |
# Remove BIND 8 packages from $rootprefix/var/sadm/install/contents |
|
2817 |
# |
|
2818 |
for pkg in $bind8_pkgs |
|
2819 |
do |
|
2820 |
if [ -d $rootprefix/var/sadm/pkg/$pkg ]; then |
|
2821 |
rm -rf $rootprefix/var/sadm/pkg/$pkg |
|
2822 |
grep -vw $pkg $rootprefix/var/sadm/install/contents > \ |
|
2823 |
/tmp/contents.$$ |
|
2824 |
cp /tmp/contents.$$ /var/sadm/install/contents.$$ |
|
2825 |
rm /tmp/contents.$$ |
|
2826 |
fi |
|
2827 |
done |
|
2828 |
||
2829 |
# |
|
2830 |
# Cleanup any BIND 8 specific files, symlinks. |
|
2831 |
# |
|
2832 |
||
2833 |
# files and symlinks. |
|
2834 |
rm -f $usr/sbin/named-xfer |
|
2835 |
rm -f $usr/lib/nslookup.help |
|
2836 |
rm -f $usr/sbin/dnskeygen |
|
2837 |
rm -f $usr/sbin/named-bootconf |
|
2838 |
rm -f $usr/sbin/nstest |
|
2839 |
rm -rf $rootprefix/var/run/ndc.d |
|
2840 |
printf 'done.\n' |
|
2841 |
} |
|
2842 |
||
2843 |
# |
|
2844 |
# Remove the 5.8.3 version of perl. |
|
2845 |
# |
|
2846 |
remove_perl_583() |
|
2847 |
{ |
|
2848 |
# |
|
2849 |
# Copy perl 5.8.3 into the new 5.8.4 locations. This will preserve |
|
2850 |
# any add-on modules that might have been installed, and any 5.8.3 |
|
2851 |
# core files that get copied over will be replaced by the new 5.8.4 |
|
2852 |
# versions when the cpio archives are subsequently extracted. |
|
2853 |
# |
|
2854 |
printf 'Preserving user-installed perl modules...\n' |
|
2855 |
mkdir -p $usr/perl5/5.8.4 |
|
2856 |
cp -rp $usr/perl5/5.8.3/* \ |
|
2857 |
$usr/perl5/5.8.4 |
|
2858 |
mkdir -p $usr/perl5/site_perl/5.8.4 |
|
2859 |
cp -rp $usr/perl5/site_perl/5.8.3/* \ |
|
2860 |
$usr/perl5/site_perl/5.8.4 |
|
2861 |
mkdir -p $usr/perl5/vendor_perl/5.8.4 |
|
2862 |
cp -rp $usr/perl5/vendor_perl/5.8.3/* \ |
|
2863 |
$usr/perl5/vendor_perl/5.8.4 |
|
2864 |
||
2865 |
# |
|
2866 |
# Update the #! lines in any scripts in /usr/perl5/5.8.4/bin to refer |
|
2867 |
# to 5.8.4 instead of 5.8.3. Take care to edit only scripts. |
|
2868 |
# |
|
2869 |
typeset bindir="$usr/perl5/5.8.4/bin" |
|
2870 |
typeset script |
|
2871 |
for script in $(ls $bindir); do |
|
2872 |
script="$bindir/$script" |
|
2873 |
if [[ $script = "$usr/perl5/5.8.4/bin/perl5.8.3" ]]; then |
|
2874 |
rm -f $script |
|
2875 |
elif file $script | \ |
|
2876 |
egrep -s 'executable .*perl .*script'; then |
|
2877 |
sed -e \ |
|
2878 |
's!/usr/perl5/5.8.3/bin/perl!/usr/perl5/5.8.4/bin/perl!g' \ |
|
2879 |
< $script > $script.tmp |
|
2880 |
mv -f $script.tmp $script |
|
2881 |
fi |
|
2882 |
done |
|
2883 |
||
2884 |
# |
|
2885 |
# Packages to remove. |
|
2886 |
# |
|
2887 |
typeset -r perl_pkgs='SUNWperl583man SUNWperl583usr SUNWperl583root' |
|
2888 |
typeset -r pkgroot=${rootprefix:+-R $rootprefix} |
|
2889 |
||
2890 |
# |
|
2891 |
# First, attempt to remove the packages cleanly if possible. |
|
2892 |
# |
|
2893 |
typeset pkg |
|
2894 |
printf 'Removing perl 5.8.3 packages' |
|
2895 |
for pkg in $perl_pkgs |
|
2896 |
do |
|
2897 |
if pkginfo $pkgroot -q $pkg; then |
|
2898 |
printf ' %s' $pkg |
|
2899 |
pkgrm $pkgroot -n $pkg >/dev/null 2>&1 |
|
2900 |
fi |
|
2901 |
done |
|
2902 |
printf '\n' |
|
2903 |
||
2904 |
# |
|
2905 |
# In case that didn't work, do it manually. |
|
2906 |
# |
|
2907 |
printf 'Removing perl 5.8.3 from %s/var/sadm/install/contents' \ |
|
2908 |
$rootprefix |
|
2909 |
for pkg in $PKGS |
|
2910 |
do |
|
2911 |
printf ' %s' $pkg |
|
2912 |
if [ -d $rootprefix/var/sadm/pkg/$pkg ]; then |
|
2913 |
rm -rf $rootprefix/var/sadm/pkg/$pkg |
|
2914 |
grep -vw $pkg $rootprefix/var/sadm/install/contents > \ |
|
2915 |
/tmp/contents.$$ |
|
2916 |
cp /tmp/contents.$$ /var/sadm/install/contents.$$ |
|
2917 |
rm /tmp/contents.$$ |
|
2918 |
fi |
|
2919 |
done |
|
2920 |
printf '\n' |
|
2921 |
||
2922 |
# |
|
2923 |
# Remove any remaining 5.8.3 files, |
|
2924 |
# and fix up the symlinks if necessary. |
|
2925 |
# |
|
2926 |
printf 'Removing perl 5.8.3 from %s/perl5\n' $usr |
|
2927 |
||
2928 |
# Directories. |
|
2929 |
rm -rf $usr/perl5/5.8.3 |
|
2930 |
rm -rf $usr/perl5/site_perl/5.8.3 |
|
2931 |
rm -rf $usr/perl5/vendor_perl/5.8.3 |
|
2932 |
||
2933 |
# bin symlink. |
|
2934 |
rm -f $usr/perl5/bin |
|
2935 |
ln -s ./5.8.4/bin $usr/perl5/bin |
|
2936 |
||
2937 |
# pod symlink. |
|
2938 |
rm -f $usr/perl5/pod |
|
2939 |
ln -s ./5.8.4/lib/pod $usr/perl5/pod |
|
2940 |
||
2941 |
# |
|
2942 |
# man symlink. In earlier S10 builds the man symlink mistakenly points |
|
2943 |
# to the 5.6.1 manpages, instead of 5.8.3. Fix to point to 5.8.4. |
|
2944 |
# |
|
2945 |
rm -f $usr/perl5/man |
|
2946 |
ln -s ./5.8.4/man $usr/perl5/man |
|
2947 |
||
2948 |
# Symlink /bin/perl to 5.8.4. |
|
2949 |
rm -f $usr/bin/perl |
|
2950 |
ln -s ../perl5/5.8.4/bin/perl $usr/bin/perl |
|
2951 |
} |
|
2952 |
||
2953 |
# |
|
2954 |
# Remove FNS/XFN packages |
|
2955 |
# |
|
2956 |
remove_eof_fns() |
|
2957 |
{ |
|
2958 |
# Packages to remove |
|
2959 |
typeset -r fns_pkgs='SUNWfnx5x SUNWfnsx5 SUNWfnsx SUNWfns' |
|
2960 |
typeset -r pkgroot=${rootprefix:+-R $rootprefix} |
|
2961 |
typeset pkg |
|
2962 |
||
2963 |
printf 'Removing FNS/XFN ... ' |
|
2964 |
||
2965 |
# |
|
2966 |
# First, attempt to remove the packages cleanly if possible. |
|
2967 |
# |
|
2968 |
for pkg in $fns_pkgs |
|
2969 |
do |
|
2970 |
if pkginfo $pkgroot -q $pkg; then |
|
2971 |
printf ' %s' $pkg |
|
2972 |
pkgrm $pkgroot -n $pkg >/dev/null 2>&1 |
|
2973 |
fi |
|
2974 |
done |
|
2975 |
printf '\n' |
|
2976 |
||
2977 |
# |
|
2978 |
# In case that didn't work, do it manually. |
|
2979 |
# Remove FNS/XFN from $rootprefix/var/sadm/install/contents |
|
2980 |
# |
|
2981 |
for pkg in $fns_pkgs |
|
2982 |
do |
|
2983 |
if [ -d $rootprefix/var/sadm/pkg/$pkg ]; then |
|
2984 |
rm -rf $rootprefix/var/sadm/pkg/$pkg |
|
2985 |
grep -vw $pkg $rootprefix/var/sadm/install/contents > \ |
|
2986 |
/tmp/contents.$$ |
|
2987 |
cp /tmp/contents.$$ $rootprefix/var/sadm/install/contents.$$ |
|
2988 |
rm /tmp/contents.$$ |
|
2989 |
fi |
|
2990 |
done |
|
2991 |
||
2992 |
# |
|
2993 |
# Cleanup if any remaining FNS/XFN files, symlinks, and directories. |
|
2994 |
# |
|
2995 |
||
2996 |
# directories. |
|
2997 |
rm -rf $rootprefix/etc/fn |
|
2998 |
rm -rf $usr/include/xfn |
|
2999 |
rm -rf $usr/lib/fn |
|
3000 |
rm -rf $rootprefix/var/fn |
|
3001 |
||
3002 |
# files and symlinks. |
|
3003 |
rm -f $rootprefix/etc/fn.conf |
|
3004 |
rm -f $usr/bin/fnattr |
|
3005 |
rm -f $usr/bin/fnbind |
|
3006 |
rm -f $usr/bin/fncreate_printer |
|
3007 |
rm -f $usr/bin/fnlist |
|
3008 |
rm -f $usr/bin/fnlookup |
|
3009 |
rm -f $usr/bin/fnrename |
|
3010 |
rm -f $usr/bin/fnsearch |
|
3011 |
rm -f $usr/bin/fnunbind |
|
3012 |
rm -f $usr/sbin/fncheck |
|
3013 |
rm -f $usr/sbin/fncopy |
|
3014 |
rm -f $usr/sbin/fncreate |
|
3015 |
rm -f $usr/sbin/fncreate_fs |
|
3016 |
rm -f $usr/sbin/fndestroy |
|
3017 |
rm -f $usr/sbin/fnselect |
|
3018 |
rm -f $usr/sbin/fnsypd |
|
3019 |
rm -f $usr/lib/libfn_p.so |
|
3020 |
rm -f $usr/lib/libfn_p.so.1 |
|
3021 |
rm -f $usr/lib/libfn_spf.so |
|
3022 |
rm -f $usr/lib/libfn_spf.so.1 |
|
3023 |
rm -f $usr/lib/libxfn.so |
|
3024 |
rm -f $usr/lib/libxfn.so.1 |
|
3025 |
rm -f $usr/lib/libxfn.so.2 |
|
3026 |
rm -f $usr/lib/sparcv9/libfn_p.so |
|
3027 |
rm -f $usr/lib/sparcv9/libfn_p.so.1 |
|
3028 |
rm -f $usr/lib/sparcv9/libfn_spf.so |
|
3029 |
rm -f $usr/lib/sparcv9/libfn_spf.so.1 |
|
3030 |
rm -f $usr/lib/sparcv9/libxfn.so |
|
3031 |
rm -f $usr/lib/sparcv9/libxfn.so.1 |
|
3032 |
rm -f $usr/lib/sparcv9/libxfn.so.2 |
|
3033 |
} |
|
3034 |
||
765 | 3035 |
remove_eof_face() { |
3036 |
# Packages to remove |
|
3037 |
typeset -r face_pkgs='SUNWfac' |
|
3038 |
typeset -r pkgroot=${rootprefix:+-R $rootprefix} |
|
3039 |
typeset pkg |
|
3040 |
||
3041 |
printf 'Removing AT&T FACE... ' |
|
3042 |
||
3043 |
# |
|
3044 |
# First, attempt to remove the packages cleanly if possible. |
|
3045 |
# |
|
3046 |
for pkg in $face_pkgs |
|
3047 |
do |
|
3048 |
if pkginfo $pkgroot -q $pkg; then |
|
3049 |
printf ' %s' $pkg |
|
3050 |
pkgrm $pkgroot -n $pkg >/dev/null 2>&1 |
|
3051 |
fi |
|
3052 |
done |
|
3053 |
printf '\n' |
|
3054 |
||
3055 |
# |
|
3056 |
# In case that didn't work, do it manually. |
|
3057 |
# Remove FACE from $rootprefix/var/sadm/install/contents |
|
3058 |
# |
|
3059 |
for pkg in $face_pkgs |
|
3060 |
do |
|
3061 |
if [ -d $rootprefix/var/sadm/pkg/$pkg ]; then |
|
3062 |
rm -rf $rootprefix/var/sadm/pkg/$pkg |
|
3063 |
grep -vw $pkg $rootprefix/var/sadm/install/contents > \ |
|
3064 |
/tmp/contents.$$ |
|
3065 |
cp /tmp/contents.$$ $rootprefix/var/sadm/install/contents.$$ |
|
3066 |
rm /tmp/contents.$$ |
|
3067 |
fi |
|
3068 |
done |
|
3069 |
||
3070 |
# |
|
3071 |
# Cleanup any remaining FACE files, symlinks, and directories. |
|
3072 |
# |
|
3073 |
rm -rf $usr/oasys |
|
3074 |
rm -rf $usr/vmsys |
|
3075 |
} |
|
3076 |
||
1706 | 3077 |
remove_eof_dmi() { |
3078 |
# Packages to remove |
|
3079 |
typeset -r dmi_pkgs='SUNWsadmi' |
|
3080 |
typeset -r pkgroot=${rootprefix:+-R $rootprefix} |
|
3081 |
typeset pkg |
|
3082 |
||
3083 |
printf 'Removing DMI... ' |
|
3084 |
||
3085 |
# |
|
3086 |
# First, attempt to remove the packages cleanly if possible. |
|
3087 |
# |
|
3088 |
for pkg in $dmi_pkgs |
|
3089 |
do |
|
3090 |
if pkginfo $pkgroot -q $pkg; then |
|
3091 |
printf ' %s' $pkg |
|
3092 |
pkgrm $pkgroot -n $pkg >/dev/null 2>&1 |
|
3093 |
fi |
|
3094 |
done |
|
3095 |
printf '\n' |
|
3096 |
||
3097 |
# |
|
3098 |
# In case that didn't work, do it manually. |
|
3099 |
# Remove DMI from $rootprefix/var/sadm/install/contents |
|
3100 |
# |
|
3101 |
for pkg in $dmi_pkgs |
|
3102 |
do |
|
3103 |
if [ -d $rootprefix/var/sadm/pkg/$pkg ]; then |
|
3104 |
rm -rf $rootprefix/var/sadm/pkg/$pkg |
|
3105 |
grep -vw $pkg $rootprefix/var/sadm/install/contents > \ |
|
3106 |
/tmp/contents.$$ |
|
3107 |
cp /tmp/contents.$$ $rootprefix/var/sadm/install/contents.$$ |
|
3108 |
rm /tmp/contents.$$ |
|
3109 |
fi |
|
3110 |
done |
|
3111 |
||
3112 |
# |
|
3113 |
# Cleanup any remaining DMI files, symlinks, and directories. |
|
3114 |
# |
|
3115 |
rm -rf $usr/lib/dmi |
|
3116 |
rm -rf $rootprefix/var/dmi |
|
3117 |
rm -rf $rootprefix/etc/dmi |
|
3118 |
rm -f $usr/lib/libdmi.so |
|
3119 |
rm -f $usr/lib/libdmici.so |
|
3120 |
rm -f $usr/lib/libdmimi.so |
|
3121 |
rm -f $usr/lib/libdmi.so.1 |
|
3122 |
rm -f $usr/lib/libdmici.so.1 |
|
3123 |
rm -f $usr/lib/libdmimi.so.1 |
|
3124 |
rm -f $usr/lib/sparcv9/libdmi.so |
|
3125 |
rm -f $usr/lib/sparcv9/libdmici.so |
|
3126 |
rm -f $usr/lib/sparcv9/libdmimi.so |
|
3127 |
rm -f $usr/lib/sparcv9/libdmi.so.1 |
|
3128 |
rm -f $usr/lib/sparcv9/libdmici.so.1 |
|
3129 |
rm -f $usr/lib/sparcv9/libdmimi.so.1 |
|
3130 |
rm -f $usr/lib/amd64/libdmi.so |
|
3131 |
rm -f $usr/lib/amd64/libdmici.so |
|
3132 |
rm -f $usr/lib/amd64/libdmimi.so |
|
3133 |
rm -f $usr/lib/amd64/libdmi.so.1 |
|
3134 |
rm -f $usr/lib/amd64/libdmici.so.1 |
|
3135 |
rm -f $usr/lib/amd64/libdmimi.so.1 |
|
3136 |
rm -f $usr/sbin/dmi_cmd |
|
3137 |
rm -f $usr/sbin/dmiget |
|
3138 |
rm -f $rootprefix/etc/init.d/init.dmi |
|
3139 |
rm -f $rootprefix/etc/rc0.d/K07dmi |
|
3140 |
rm -f $rootprefix/etc/rc1.d/K07dmi |
|
3141 |
rm -f $rootprefix/etc/rc2.d/K07dmi |
|
3142 |
rm -f $rootprefix/etc/rcS.d/K07dmi |
|
3143 |
rm -f $rootprefix/etc/rc3.d/S77dmi |
|
3144 |
} |
|
3145 |
||
2912
85ea316d9c18
PSARC 2005/399 Tamarack: Removable Media Enhancements in Solaris
artem
parents:
2866
diff
changeset
|
3146 |
# |
85ea316d9c18
PSARC 2005/399 Tamarack: Removable Media Enhancements in Solaris
artem
parents:
2866
diff
changeset
|
3147 |
# Remove vold |
85ea316d9c18
PSARC 2005/399 Tamarack: Removable Media Enhancements in Solaris
artem
parents:
2866
diff
changeset
|
3148 |
# |
85ea316d9c18
PSARC 2005/399 Tamarack: Removable Media Enhancements in Solaris
artem
parents:
2866
diff
changeset
|
3149 |
remove_eof_vold() |
85ea316d9c18
PSARC 2005/399 Tamarack: Removable Media Enhancements in Solaris
artem
parents:
2866
diff
changeset
|
3150 |
{ |
85ea316d9c18
PSARC 2005/399 Tamarack: Removable Media Enhancements in Solaris
artem
parents:
2866
diff
changeset
|
3151 |
printf 'Removing vold... ' |
85ea316d9c18
PSARC 2005/399 Tamarack: Removable Media Enhancements in Solaris
artem
parents:
2866
diff
changeset
|
3152 |
|
85ea316d9c18
PSARC 2005/399 Tamarack: Removable Media Enhancements in Solaris
artem
parents:
2866
diff
changeset
|
3153 |
rm -rf $usr/lib/vold |
85ea316d9c18
PSARC 2005/399 Tamarack: Removable Media Enhancements in Solaris
artem
parents:
2866
diff
changeset
|
3154 |
rm -rf $usr/lib/rmmount |
85ea316d9c18
PSARC 2005/399 Tamarack: Removable Media Enhancements in Solaris
artem
parents:
2866
diff
changeset
|
3155 |
rm -f $usr/lib/fs/hsfs/ident_hsfs.so.1 |
85ea316d9c18
PSARC 2005/399 Tamarack: Removable Media Enhancements in Solaris
artem
parents:
2866
diff
changeset
|
3156 |
rm -f $usr/lib/fs/pcfs/ident_pcfs.so.1 |
85ea316d9c18
PSARC 2005/399 Tamarack: Removable Media Enhancements in Solaris
artem
parents:
2866
diff
changeset
|
3157 |
rm -f $usr/lib/fs/udfs/ident_udfs.so.1 |
85ea316d9c18
PSARC 2005/399 Tamarack: Removable Media Enhancements in Solaris
artem
parents:
2866
diff
changeset
|
3158 |
rm -f $usr/lib/fs/ufs/ident_ufs.so.1 |
85ea316d9c18
PSARC 2005/399 Tamarack: Removable Media Enhancements in Solaris
artem
parents:
2866
diff
changeset
|
3159 |
rm -f $usr/sbin/vold |
85ea316d9c18
PSARC 2005/399 Tamarack: Removable Media Enhancements in Solaris
artem
parents:
2866
diff
changeset
|
3160 |
rm -f $usr/kernel/drv/vol |
85ea316d9c18
PSARC 2005/399 Tamarack: Removable Media Enhancements in Solaris
artem
parents:
2866
diff
changeset
|
3161 |
rm -f $usr/kernel/drv/amd64/vol |
85ea316d9c18
PSARC 2005/399 Tamarack: Removable Media Enhancements in Solaris
artem
parents:
2866
diff
changeset
|
3162 |
rm -f $usr/kernel/drv/sparcv9/vol |
85ea316d9c18
PSARC 2005/399 Tamarack: Removable Media Enhancements in Solaris
artem
parents:
2866
diff
changeset
|
3163 |
rm -f $usr/include/rmmount.h |
85ea316d9c18
PSARC 2005/399 Tamarack: Removable Media Enhancements in Solaris
artem
parents:
2866
diff
changeset
|
3164 |
rm -f $usr/include/vol.h |
85ea316d9c18
PSARC 2005/399 Tamarack: Removable Media Enhancements in Solaris
artem
parents:
2866
diff
changeset
|
3165 |
rm -f $rootprefix/etc/vold.conf |
85ea316d9c18
PSARC 2005/399 Tamarack: Removable Media Enhancements in Solaris
artem
parents:
2866
diff
changeset
|
3166 |
rm -f $rootprefix/etc/rmmount.conf |
85ea316d9c18
PSARC 2005/399 Tamarack: Removable Media Enhancements in Solaris
artem
parents:
2866
diff
changeset
|
3167 |
|
85ea316d9c18
PSARC 2005/399 Tamarack: Removable Media Enhancements in Solaris
artem
parents:
2866
diff
changeset
|
3168 |
printf '\n' |
85ea316d9c18
PSARC 2005/399 Tamarack: Removable Media Enhancements in Solaris
artem
parents:
2866
diff
changeset
|
3169 |
} |
85ea316d9c18
PSARC 2005/399 Tamarack: Removable Media Enhancements in Solaris
artem
parents:
2866
diff
changeset
|
3170 |
|
0 | 3171 |
remove_properties() { |
3172 |
||
3173 |
# |
|
3174 |
# Remove obsolete smartii setprop from bootenv.rc |
|
3175 |
# |
|
3176 |
srcbootenvrc=$root/boot/solaris/bootenv.rc |
|
3177 |
tmpbootenvrc=/tmp/tmp.bootenvrc.$$ |
|
3178 |
||
3179 |
# Don't touch bootenv.rc unless it contains obsolete property |
|
3180 |
egrep -s 'target-driver-for-smartii' $srcbootenvrc 2>/dev/null |
|
3181 |
res=$? |
|
3182 |
if [ -f $srcbootenvrc -a $res -eq 0 ]; then |
|
3183 |
egrep -v "target-driver-for-smartii"\ |
|
3184 |
$srcbootenvrc > $tmpbootenvrc 2>/dev/null |
|
3185 |
cp $tmpbootenvrc $srcbootenvrc |
|
3186 |
fi |
|
3187 |
rm -f $tmpbootenvrc |
|
3188 |
} |
|
3189 |
||
3190 |
enable_crypto_unlimited() |
|
3191 |
{ |
|
3192 |
# This is a "copy" of the SUNWcry* postinstall scripts. |
|
3193 |
# We enable the encryption kit aes256, arcfour2048, and blowfish448 modules. |
|
3194 |
# This is needed to ensure bfu users continue to have the full strength of |
|
3195 |
# cryptographic algorithms they use. |
|
3196 |
||
3197 |
print "Simulating SUNWcry* installation...\c" |
|
3198 |
kcfconf=$rootprefix/etc/crypto/kcf.conf |
|
1011 | 3199 |
ipsecalgs=$rootprefix/etc/inet/ipsecalgs |
0 | 3200 |
|
3201 |
cp $kcfconf ${kcfconf}.tmp |
|
3202 |
||
3203 |
sed -e 's/^aes:/aes256:/' -e 's/^blowfish:/blowfish448:/' -e \ |
|
3204 |
's/^arcfour:/arcfour2048:/'\ |
|
3205 |
$kcfconf > ${kcfconf}.tmp |
|
3206 |
||
3207 |
mv -f ${kcfconf}.tmp $kcfconf |
|
3208 |
||
1011 | 3209 |
cp $ipsecalgs ${ipsecalgs}.tmp |
3210 |
||
3211 |
sed -e 's/_CBC|128\/32-128,8/_CBC|128\/32-448,8/' \ |
|
3212 |
-e 's/AES_CBC|128|/AES_CBC|128\/128-256,64|/' \ |
|
3213 |
$ipsecalgs > ${ipsecalgs}.tmp |
|
3214 |
||
3215 |
mv -f ${ipsecalgs}.tmp $ipsecalgs |
|
3216 |
||
0 | 3217 |
# Since we do that for the kernel we do it for userland as well. |
3218 |
||
3219 |
# "Clone" the policy for pkcs11_softtoken to the encryption kit version |
|
3220 |
# and "disable" pkcs11_softoken. |
|
3221 |
||
3222 |
pkcs11conf=$rootprefix/etc/crypto/pkcs11.conf |
|
3223 |
||
3224 |
cp $pkcs11conf ${pkcs11conf}.tmp |
|
3225 |
||
3226 |
sed 's/pkcs11_softtoken\.so/pkcs11_softtoken_extra.so/' \ |
|
3227 |
$pkcs11conf > ${pkcs11conf}.tmp |
|
3228 |
||
3229 |
mv -f ${pkcs11conf}.tmp $pkcs11conf |
|
3230 |
print "\n" |
|
3231 |
||
3232 |
} |
|
3233 |
||
3234 |
# |
|
3235 |
# Add metaslot configuration to pkcs11.conf if it doesn't already exist |
|
3236 |
# |
|
3237 |
enable_crypto_metaslot() |
|
3238 |
{ |
|
3239 |
pkcs11conf=$rootprefix/etc/crypto/pkcs11.conf |
|
3240 |
egrep '^metaslot' ${pkcs11conf} > /dev/null 2>& 1 |
|
3241 |
if [ $? != 0 ] ; then |
|
3242 |
print "Adding cryptographic framework's meta slot feature" |
|
3243 |
cp $pkcs11conf ${pkcs11conf}.tmp |
|
3244 |
export metaslot_config=\ |
|
3245 |
"metaslot:metaslot_status=enabled;metaslot_auto_key_migrate=enabled;"\ |
|
3246 |
"metaslot_token=Sun Software PKCS#11 softtoken;"\ |
|
3247 |
"metaslot_slot=Sun Crypto Softtoken" |
|
3248 |
nawk '/^# End SUNWcsr/ \ |
|
3249 |
{ print ENVIRON["metaslot_config"] } \ |
|
3250 |
{ print } \ |
|
3251 |
' ${pkcs11conf} > ${pkcs11conf}.tmp |
|
3252 |
mv -f ${pkcs11conf}.tmp $pkcs11conf |
|
3253 |
print "\n" |
|
3254 |
fi |
|
3255 |
} |
|
3256 |
||
3257 |
cleanup_kerberos_mechanisms() |
|
3258 |
{ |
|
3259 |
# |
|
3260 |
# This checks to see if the old 'gl' and 'do' directories |
|
3261 |
# for the Kerberos GSS-API mechanisms can be deleted. |
|
3262 |
# If the mechanism exists in /usr/lib/gss, then the old |
|
3263 |
# subdirs may be deleted. |
|
3264 |
# |
|
3265 |
print "Cleaning up old Kerberos GSS-API mechanisms...\c" |
|
3266 |
||
3267 |
kerneldir=kernel/misc/kgss |
|
3268 |
kerneldir_sparc=kernel/misc/kgss/sparcv9 |
|
3269 |
||
3270 |
newmech=no; |
|
3271 |
if [ -f $usr/lib/gss/mech_krb5.so.1 ]; then |
|
3272 |
# |
|
3273 |
# There is a mech in the "new" location, so |
|
3274 |
# the old stuff can be deleted. |
|
3275 |
# |
|
3276 |
if [ -d $usr/lib/gss/gl ]; then |
|
3277 |
rm -rf $usr/lib/gss/gl |
|
3278 |
fi |
|
3279 |
if [ -d $usr/lib/gss/do ]; then |
|
3280 |
rm -rf $usr/lib/gss/do |
|
3281 |
fi |
|
3282 |
newmech=yes; |
|
3283 |
fi |
|
3284 |
if [ -f $usr/lib/sparcv9/gss/mech_krb5.so.1 ]; then |
|
3285 |
if [ -d $usr/lib/sparcv9/gss/gl ]; then |
|
3286 |
rm -rf $usr/lib/sparcv9/gss/gl |
|
3287 |
fi |
|
3288 |
if [ -d $usr/lib/sparcv9/gss/do ]; then |
|
3289 |
rm -rf $usr/lib/sparcv9/gss/do |
|
3290 |
fi |
|
3291 |
fi |
|
3292 |
# |
|
3293 |
# Cleanup kernel mechanisms from default location |
|
3294 |
# |
|
3295 |
if [ -f $rootprefix/$kerneldir/kmech_krb5 ]; then |
|
3296 |
if [ -f $rootprefix/$kerneldir/gl_kmech_krb5 ]; then |
|
3297 |
rm -f $rootprefix/$kerneldir/gl_kmech_krb5 |
|
3298 |
fi |
|
3299 |
if [ -f $rootprefix/$kerneldir/do_kmech_krb5 ]; then |
|
3300 |
rm -f $rootprefix/$kerneldir/do_kmech_krb5 |
|
3301 |
fi |
|
3302 |
fi |
|
3303 |
# |
|
3304 |
# For SPARC, cleanup from 2 locations. |
|
3305 |
# |
|
3306 |
# 1. /kernel/misc/kgss/sparcv9 |
|
3307 |
# |
|
3308 |
if [ -f $rootprefix/$kerneldir_sparc/kmech_krb5 ]; then |
|
3309 |
if [ -f $rootprefix/$kerneldir_sparc/gl_kmech_krb5 ]; then |
|
3310 |
rm -f $rootprefix/$kerneldir_sparc/gl_kmech_krb5 |
|
3311 |
fi |
|
3312 |
if [ -f $rootprefix/$kerneldir_sparc/do_kmech_krb5 ]; then |
|
3313 |
rm -f $rootprefix/$kerneldir_sparc/do_kmech_krb5 |
|
3314 |
fi |
|
3315 |
fi |
|
3316 |
# |
|
3317 |
# 2. /platform/sun4u/kernel/misc/kgss/sparcv9 |
|
3318 |
# |
|
3319 |
kerneldir_sparc=platform/$karch/$kerneldir_sparc |
|
3320 |
if [ -f $rootprefix/$kerneldir_sparc/kmech_krb5 ]; then |
|
3321 |
if [ -f $rootprefix/$kerneldir_sparc/gl_kmech_krb5 ]; then |
|
3322 |
rm -f $rootprefix/$kerneldir_sparc/gl_kmech_krb5 |
|
3323 |
fi |
|
3324 |
if [ -f $rootprefix/$kerneldir_sparc/do_kmech_krb5 ]; then |
|
3325 |
rm -f $rootprefix/$kerneldir_sparc/do_kmech_krb5 |
|
3326 |
fi |
|
3327 |
fi |
|
3328 |
# |
|
3329 |
# Make sure the GSS mechanism configuration file is correct |
|
3330 |
# |
|
3331 |
if [ "$newmech" = "yes" ]; then |
|
3332 |
gssmechconf=$rootprefix/etc/gss/mech |
|
3333 |
||
3334 |
sed -e 's/gl\/mech_krb5\.so/mech_krb5\.so/' \ |
|
3335 |
-e 's/do\/mech_krb5\.so/mech_krb5\.so/' \ |
|
3336 |
-e 's/gl_kmech_krb5/kmech_krb5/' \ |
|
3337 |
-e 's/do_kmech_krb5/kmech_krb5/'\ |
|
3338 |
$gssmechconf > ${gssmechconf}.tmp |
|
3339 |
||
3340 |
if [ $? -eq 0 ]; then |
|
3341 |
mv -f ${gssmechconf}.tmp $gssmechconf |
|
3342 |
else |
|
3343 |
echo "WARNING: update of $gssmechconf failed." |
|
3344 |
return 1 |
|
3345 |
fi |
|
3346 |
fi |
|
3347 |
print "\n" |
|
3348 |
} |
|
3349 |
||
3350 |
mpxiodisableno='^[ ]*mpxio-disable[ ]*=[ ]*"no"[ ]*;' |
|
3351 |
mpxiodisableyes='^[ ]*mpxio-disable[ ]*=[ ]*"yes"[ ]*;' |
|
3352 |
||
3353 |
# |
|
3217
24c2e767a02d
6494262 application using audit interface require file_dac_read or uid 0
gww
parents:
3201
diff
changeset
|
3354 |
# fix up audit permissions |
24c2e767a02d
6494262 application using audit interface require file_dac_read or uid 0
gww
parents:
3201
diff
changeset
|
3355 |
# |
24c2e767a02d
6494262 application using audit interface require file_dac_read or uid 0
gww
parents:
3201
diff
changeset
|
3356 |
fix_up_audit() |
24c2e767a02d
6494262 application using audit interface require file_dac_read or uid 0
gww
parents:
3201
diff
changeset
|
3357 |
{ |
24c2e767a02d
6494262 application using audit interface require file_dac_read or uid 0
gww
parents:
3201
diff
changeset
|
3358 |
chmod 644 $root/etc/security/audit_control |
24c2e767a02d
6494262 application using audit interface require file_dac_read or uid 0
gww
parents:
3201
diff
changeset
|
3359 |
chmod 644 $root/etc/security/audit_user |
24c2e767a02d
6494262 application using audit interface require file_dac_read or uid 0
gww
parents:
3201
diff
changeset
|
3360 |
} |
24c2e767a02d
6494262 application using audit interface require file_dac_read or uid 0
gww
parents:
3201
diff
changeset
|
3361 |
|
24c2e767a02d
6494262 application using audit interface require file_dac_read or uid 0
gww
parents:
3201
diff
changeset
|
3362 |
# |
0 | 3363 |
# disable mpxio on fp(7D) ports using fp.conf |
3364 |
# |
|
3365 |
disable_mpxio_using_fpconf() |
|
3366 |
{ |
|
3367 |
conffile=$rootprefix/kernel/drv/fp.conf |
|
3368 |
test -f $conffile || return |
|
3369 |
egrep -s "$mpxiodisableyes" $conffile && return |
|
3370 |
||
3371 |
print "To preserve device names, disabled mpxio on fp(7D) ports by" |
|
3372 |
||
3373 |
if egrep -s "$mpxiodisableno" $conffile; then |
|
3374 |
tmpfile=/tmp/fp.conf.$$ |
|
3375 |
sed "s/$mpxiodisableno/mpxio-disable=\"yes\";/" $conffile \ |
|
3376 |
> $tmpfile |
|
3377 |
cp $tmpfile $conffile |
|
3378 |
rm -f $tmpfile |
|
3379 |
print "changing the value of mpxio-disable to \"yes\" in" \ |
|
3380 |
"$conffile" |
|
3381 |
else |
|
3382 |
echo 'mpxio-disable="yes";' >> $conffile |
|
3383 |
print "adding mpxio-disable=\"yes\" entry to $conffile" |
|
3384 |
fi |
|
3385 |
} |
|
3386 |
||
3387 |
# |
|
3388 |
# enable mpxio in scsi_vhci |
|
3389 |
# |
|
3390 |
enable_mpxio_using_scsivhciconf() |
|
3391 |
{ |
|
3392 |
# |
|
3393 |
# depending on whether the bfu restored the child's or parent's version |
|
3394 |
# of scsi_vhci.conf file, we may already have the file with the change |
|
3395 |
# we need in place. So make the change only if necessary. |
|
3396 |
# |
|
3397 |
||
3398 |
conffile=$rootprefix/kernel/drv/scsi_vhci.conf |
|
3399 |
egrep -s "$mpxiodisableno" $conffile && return |
|
3400 |
||
3401 |
print "To preserve device names, restored your current mpxio" \ |
|
3402 |
"configuration by" |
|
3403 |
||
3404 |
if egrep -s "$mpxiodisableyes" $conffile; then |
|
3405 |
tmpfile=/tmp/scsi_vhci.conf.$$ |
|
3406 |
sed "s/$mpxiodisableyes/mpxio-disable=\"no\";/" $conffile \ |
|
3407 |
> $tmpfile |
|
3408 |
cp $tmpfile $conffile |
|
3409 |
rm -f $tmpfile |
|
3410 |
print "changing the value of mpxio-disable to \"no\" in" \ |
|
3411 |
"$conffile" |
|
3412 |
else |
|
3413 |
echo 'mpxio-disable="no";' >> $conffile |
|
3414 |
print "adding mpxio-disable=\"no\" entry to $conffile" |
|
3415 |
fi |
|
3416 |
} |
|
3417 |
||
3418 |
# |
|
3419 |
# restore the pre-bfu MPxIO on/off setting to the post-bfued configuration |
|
3420 |
# |
|
3421 |
fixup_mpxio() |
|
3422 |
{ |
|
3423 |
conffile=$rootprefix/kernel/drv/scsi_vhci.conf |
|
3424 |
parentconffile=$rootprefix/bfu.parent/kernel/drv/scsi_vhci.conf |
|
3425 |
childconffile=$rootprefix/bfu.child/kernel/drv/scsi_vhci.conf |
|
3426 |
ancestorconffile=$rootprefix/bfu.ancestor/kernel/drv/scsi_vhci.conf |
|
3427 |
||
3428 |
# if scsi_vhci.conf doesn't exist return |
|
3429 |
test -f $conffile || return |
|
3430 |
||
3431 |
# |
|
3432 |
# Determine the mpxio setting in the child. If the system was bfued |
|
3433 |
# before and running with mpxio on by deafult bits, can't rely on the |
|
3434 |
# mpxio-disable entry in the child's scsi_vhci.conf file as it may |
|
3435 |
# contain stale left over entries. |
|
3436 |
# |
|
3437 |
mpxio_child=1 |
|
3438 |
if [ -f $ancestorconffile ]; then |
|
3439 |
if egrep -s "$mpxiodisableyes" $ancestorconffile; then |
|
3440 |
# |
|
3441 |
# prior to the bfu the system was running with |
|
3442 |
# mpxio off by default bits. |
|
3443 |
# |
|
3444 |
mpxio_child=0 |
|
3445 |
egrep -s "$mpxiodisableno" $childconffile && \ |
|
3446 |
mpxio_child=1 |
|
3447 |
fi |
|
3448 |
else |
|
3449 |
egrep -s "$mpxiodisableyes" $childconffile && mpxio_child=0 |
|
3450 |
fi |
|
3451 |
||
3452 |
if egrep -s "$mpxiodisableyes" $parentconffile; then |
|
3453 |
# these bits require explicit enabling of mpxio at in scsi_vhci |
|
3454 |
if [ $mpxio_child -eq 1 ]; then |
|
3455 |
egrep -s "$mpxiodisableyes" \ |
|
3456 |
$rootprefix/kernel/drv/fp.conf || \ |
|
3457 |
enable_mpxio_using_scsivhciconf |
|
3458 |
fi |
|
3459 |
else |
|
3460 |
# |
|
3461 |
# these bits have mpxio enabled by default in scsi_vhci. |
|
3462 |
# if mpxio is disabled in the child, disable mpxio on all |
|
3463 |
# fp(7D) ports using fp.conf. |
|
3464 |
# |
|
3465 |
[ $mpxio_child -eq 0 ] && disable_mpxio_using_fpconf |
|
3466 |
fi |
|
3467 |
} |
|
3468 |
||
3469 |
||
3470 |
# |
|
3471 |
# Check to see if root in $1 has a mounted boot, and that |
|
3472 |
# it's mounted at the right place for bfu to handle it. |
|
3473 |
# |
|
3474 |
# Returns 0 (true) if bfu can handle the upgrade; fails if not |
|
3475 |
# |
|
3476 |
||
3477 |
boot_is_upgradeable() |
|
3478 |
{ |
|
3479 |
ROOT=$1 |
|
3480 |
if [ "$ROOT" = "/" ] ; then ROOT=""; fi |
|
3481 |
||
3482 |
BOOTPARTDEV="$(grep -s -v '^#' ${ROOT}/etc/vfstab | \ |
|
3483 |
grep "[ ]/boot[ ]*pcfs[ ]" | \ |
|
3484 |
awk '{print $1}')" |
|
3485 |
||
3486 |
# find out if, and where, boot is mounted |
|
3487 |
||
3488 |
if [ -n "$BOOTPARTDEV" ] ; then |
|
3489 |
if [ -n "$ROOT" ] ; then |
|
3490 |
||
3491 |
BOOTMNT=$(mount | grep "$BOOTPARTDEV" | \ |
|
3492 |
awk '{print $1}') |
|
3493 |
else |
|
3494 |
BOOTMNT="/boot" |
|
3495 |
fi |
|
3496 |
if [ "$BOOTMNT" != ${ROOT}/boot ] ; then |
|
3497 |
cat << BOOTMOUNTERR |
|
3498 |
||
3499 |
${ROOT} refers to an x86 boot partition, but it's not mounted |
|
3500 |
at ${ROOT}/boot. |
|
3501 |
||
3502 |
BOOTMOUNTERR |
|
3503 |
fail "Mount ${ROOT}s bootpart at ${ROOT}/boot.\n\n" |
|
3504 |
fi |
|
3505 |
fi |
|
3506 |
||
3507 |
return 0 |
|
3508 |
} |
|
3509 |
||
3510 |
# update the realmode boot programs at $1 (root) |
|
3511 |
# from classic boot psm/stand/bootblks/ufs/i386/installboot.sh |
|
3512 |
||
3513 |
install_boot_i386() |
|
3514 |
{ |
|
3515 |
PBOOT=$1 |
|
3516 |
BOOTBLK=$2 |
|
3517 |
DEVICE=$3 |
|
3518 |
if [ ! -f $PBOOT ]; then |
|
3519 |
echo "$PBOOT: File not found" |
|
3520 |
return 1 |
|
3521 |
fi |
|
3522 |
if [ ! -f $BOOTBLK ]; then |
|
3523 |
echo "$BOOTBLK: File not found" |
|
3524 |
return 1 |
|
3525 |
fi |
|
3526 |
if [ ! -c $DEVICE ]; then |
|
3527 |
echo "$DEVICE: Not a character device" |
|
3528 |
return 1 |
|
3529 |
fi |
|
3530 |
if [ ! -w $DEVICE ]; then |
|
3531 |
echo "$DEVICE: Not writeable" |
|
3532 |
return 1 |
|
3533 |
fi |
|
3534 |
||
3535 |
# pboot at block 0, label at blocks 1 and 2, bootblk from block 3 on |
|
3536 |
dd if=$PBOOT of=$DEVICE bs=1b count=1 conv=sync >/dev/null 2>&1 |
|
3537 |
||
3538 |
dd if=$BOOTBLK of=$DEVICE bs=1b oseek=3 conv=sync >/dev/null 2>&1 |
|
3539 |
||
3540 |
return 0 |
|
3541 |
} |
|
3542 |
||
3543 |
update_realmode_booters() |
|
3544 |
{ |
|
3545 |
ROOT=$1 |
|
3546 |
||
3547 |
TMPDIR=/tmp/rmupdate.$$ |
|
3548 |
trap "rm -rf $TMPDIR" EXIT |
|
3549 |
||
3550 |
# go get new versions of boot files into TMPDIR |
|
3551 |
||
3552 |
OLD_PWD=$(pwd) |
|
3553 |
mkdir $TMPDIR |
|
3554 |
cd $TMPDIR |
|
3555 |
||
3556 |
# i86pc.boot archive |
|
3557 |
REQFILES="boot/mdboot boot/strap.com" |
|
3558 |
$ZCAT $cpiodir/i86pc.boot$ZFIX | cpio -id $REQFILES 2>/dev/null |
|
3559 |
mv $REQFILES $TMPDIR |
|
3560 |
||
3561 |
# i86pc.usr archive |
|
3562 |
REQFILES="usr/platform/i86pc/lib/fs/ufs/pboot" |
|
3563 |
REQFILES="$REQFILES usr/platform/i86pc/lib/fs/ufs/bootblk" |
|
3564 |
$ZCAT $cpiodir/i86pc.usr$ZFIX | cpio -id $REQFILES 2>/dev/null |
|
3565 |
mv $REQFILES $TMPDIR |
|
3566 |
||
3567 |
cd $OLD_PWD |
|
3568 |
||
3569 |
grep -s -v '^#' ${ROOT}/etc/vfstab | \ |
|
3570 |
grep "[ ]/boot[ ]*pcfs[ ]" >/dev/null |
|
3571 |
||
3572 |
if [ $? -eq 0 ] ; then |
|
3573 |
echo 'Updating /boot on x86 boot partition.' |
|
3574 |
||
3575 |
REQFILES="mdboot strap.com" |
|
3576 |
for f in ${REQFILES}; do |
|
3577 |
if [ ! -f ${TMPDIR}/$f ]; then |
|
3578 |
fail "Missing $f, aborting." |
|
3579 |
fi |
|
3580 |
done |
|
3581 |
||
3582 |
MDBOOT=${TMPDIR}/mdboot |
|
3583 |
STRAP=${TMPDIR}/strap.com |
|
3584 |
||
3585 |
LUBIN=/usr/lib/lu |
|
3586 |
TMP_FDFILE1=${TMPDIR}/fdfile1.$$ |
|
3587 |
LOGFILE=${TMPDIR}/mkfs.log.$$ |
|
3588 |
DDCOPY=${TMPDIR}/.dd_x86_boot_copy |
|
3589 |
||
3590 |
DISKID="$(grep -s -v '^#' ${ROOT}/etc/vfstab | \ |
|
3591 |
grep "[ ]/boot[ ]*pcfs[ ]" |\ |
|
3592 |
awk '{print $1}' | sed -e 's:p0\:boot::g')" |
|
3593 |
||
3594 |
DISKID="$(basename ${DISKID})" |
|
3595 |
||
3596 |
# Obtain the disk table; it will look something like the following: |
|
3597 |
# |
|
3598 |
# * Id Act Bhead Bsect Bcyl Ehead Esect Ecyl Rsect Numsect |
|
3599 |
# 130 128 27 28 0 242 9 553 1728 8897472 |
|
3600 |
# |
|
3601 |
# Delete all blank lines, and all lines that begin with *, |
|
3602 |
# leaving only actual fdisk entries that we can scan |
|
3603 |
# looking for the X86BOOT partition |
|
3604 |
||
3605 |
fdisk -W - /dev/rdsk/${DISKID}p0 | \ |
|
3606 |
grep -v '^*' | grep -v '^$' > ${TMP_FDFILE1} |
|
3607 |
||
3608 |
num=1 |
|
3609 |
||
3610 |
while read id act bhead bcyl ehead ecyl rsect numsect |
|
3611 |
do |
|
3612 |
# Ignore entry if not X86 /boot partition |
|
3613 |
# ID '190' is the X86BOOT partition (see man fdisk(1M)) |
|
3614 |
||
3615 |
if [ $id -ne "190" ] ; then |
|
3616 |
num=$(expr $num + 1) |
|
3617 |
continue |
|
3618 |
fi |
|
3619 |
||
3620 |
# Found X86 boot partition - save contents to $DDCOPY |
|
3621 |
BOOTPART=/dev/rdsk/${DISKID}p${num} |
|
3622 |
echo "Boot device is <${BOOTPART}>" |
|
3623 |
||
3624 |
ERRMSG="$(dd if=${BOOTPART} of=${DDCOPY} 2>&1)" |
|
3625 |
if [ $? -ne 0 ] ; then |
|
3626 |
[ -n "${ERRMSG}" ] && echo "${ERRMSG}" |
|
3627 |
fail "Unable to save copy of <${BOOTPART}>." |
|
3628 |
fi |
|
3629 |
||
3630 |
# mount copy of old /boot partition |
|
3631 |
LOBOOTDEV=$(lofiadm -a ${DDCOPY} 2>&1) |
|
3632 |
if [ $? -ne 0 ] ; then |
|
3633 |
[ -n "${LOBOOTDEV}" ] && echo "${LOBOOTDEV}" |
|
3634 |
fail "Unable to make lo-device <${DDCOPY}>" |
|
3635 |
fi |
|
3636 |
SOURCE_BOOT_DEV="${TMPDIR}/tmpbootdev.$$" |
|
3637 |
mkdir ${SOURCE_BOOT_DEV} |
|
3638 |
ERRMSG=$(mount -F pcfs ${LOBOOTDEV} \ |
|
3639 |
${SOURCE_BOOT_DEV}) |
|
3640 |
if [ $? -ne 0 ] ; then |
|
3641 |
[ -n "${ERRMSG}" ] && echo "${ERRMSG}" |
|
3642 |
fail "Unable to mount lo-device <${LOBOOTDEV}>." |
|
3643 |
fi |
|
3644 |
||
3645 |
# recreate existing boot partition with updated |
|
3646 |
# boot files |
|
3647 |
||
3648 |
# umount ${ROOT}'s /boot if mounted |
|
3649 |
||
3650 |
BOOTMOUNTPT=$(mount | grep ${DISKID}p0:boot 2>&1 | \ |
|
3651 |
awk '{print $1;}') |
|
3652 |
||
3653 |
if [ -n "${BOOTMOUNTPT}" ] ; then |
|
3654 |
echo "unmounting /dev/dsk/${DISKID}p0:boot" |
|
3655 |
ERRMSG=$(umount \ |
|
3656 |
/dev/dsk/${DISKID}p0:boot 2>&1) |
|
3657 |
if [ $? -ne 0 ] ; then |
|
3658 |
[ -n "${ERRMSG}" ] && echo "${ERRMSG}" |
|
3659 |
fail "Unable to umount X86 boot device." |
|
3660 |
fi |
|
3661 |
fi |
|
3662 |
||
3663 |
echo "Making new pcfs file system on ${DISKID}" |
|
3664 |
||
3665 |
echo y | /usr/lib/fs/pcfs/mkfs -F pcfs \ |
|
3666 |
-o S,s,B=$MDBOOT,b=BOOT,i=$STRAP \ |
|
3667 |
/dev/rdsk/${DISKID}p0:boot >> ${LOGFILE} 2>&1 |
|
3668 |
if [ $? -ne 0 ] ; then |
|
3669 |
echo "Unable to make pcfs:" |
|
3670 |
cat ${LOGFILE} |
|
3671 |
fail "" |
|
3672 |
fi |
|
3673 |
||
3674 |
echo "Copying x86 boot partition contents back\c" |
|
3675 |
echo " to new /boot fs." |
|
3676 |
||
3677 |
OLD_PWD=$(pwd) |
|
3678 |
||
3679 |
echo "Remounting freshened /boot partition" |
|
3680 |
||
3681 |
if [ -z "${BOOTMOUNTPT}" ] ; then |
|
3682 |
# boot ptn wasn't mounted |
|
3683 |
BOOTMOUNT="/tmp/bootpart" |
|
3684 |
mkdir ${BOOTMOUNT} |
|
3685 |
else |
|
3686 |
BOOTMOUNT=${BOOTMOUNTPT} |
|
3687 |
fi |
|
3688 |
||
3689 |
ERRMSG=$(mount -F pcfs \ |
|
3690 |
/dev/dsk/${DISKID}p0:boot ${BOOTMOUNT} 2>&1) |
|
3691 |
||
3692 |
if [ $? -ne 0 ] ; then |
|
3693 |
[ -n "${ERRMSG}" ] && echo "${ERRMSG}" |
|
3694 |
fail "Unable to mount X86 boot device." |
|
3695 |
fi |
|
3696 |
||
3697 |
# copy old /boot contents |
|
3698 |
cd ${SOURCE_BOOT_DEV} |
|
3699 |
find . -mount \! -type s -print | \ |
|
3700 |
cpio -pcdum ${BOOTMOUNT} 2>&1 | \ |
|
3701 |
${LUBIN}/lustripcpioerr |
|
3702 |
||
3703 |
if [ $? -ne 0 ] ; then |
|
3704 |
fail "Unable to copy boot partition contents." |
|
3705 |
fi |
|
3706 |
||
3707 |
cd ${OLD_PWD} |
|
3708 |
||
3709 |
# unmount and rm our boot mount, if we created it |
|
3710 |
if [ -z "${BOOTMOUNTPT}" ] ; then |
|
3711 |
ERRMSG=$(umount ${BOOTMOUNT} 2>&1) |
|
3712 |
if [ $? -ne 0 ] ; then |
|
3713 |
[ -n "${ERRMSG}" ] && echo "${ERRMSG}" |
|
3714 |
fail "Unable to umount <$BOOTMOUNT>." |
|
3715 |
fi |
|
3716 |
rm -rf ${BOOTMOUNT} |
|
3717 |
fi |
|
3718 |
||
3719 |
# unmount, un-lofi, and rm SOURCE_BOOT_DEV |
|
3720 |
||
3721 |
ERRMSG=$(umount ${SOURCE_BOOT_DEV} 2>&1) |
|
3722 |
if [ $? -ne 0 ] ; then |
|
3723 |
[ -n "${ERRMSG}" ] && echo "${ERRMSG}" |
|
3724 |
fail "Cannot umount lo-device <${LOBOOTDEV}>." |
|
3725 |
fi |
|
3726 |
||
3727 |
ERRMSG=$(lofiadm -d ${DDCOPY} 2>&1) |
|
3728 |
if [ $? -ne 0 ] ; then |
|
3729 |
[ -n "${ERRMSG}" ] && echo "${ERRMSG}" |
|
3730 |
fail "Cannot remove lo-device <${LOBOOTDEV}>." |
|
3731 |
fi |
|
3732 |
||
3733 |
rm -rf ${SOURCE_BOOT_DEV} |
|
3734 |
||
3735 |
done < ${TMP_FDFILE1} |
|
3736 |
rm ${TMP_FDFILE1} ${LOGFILE} ${DDCOPY} |
|
3737 |
||
3738 |
else |
|
3739 |
||
3740 |
# non boot-partition: use installboot to get pboot and bootblk |
|
3741 |
echo "Updating /boot on Solaris partition." |
|
3742 |
||
3743 |
if [ -z "${ROOT}" ] ; then SEARCH="/"; else SEARCH="${ROOT}"; fi |
|
3744 |
||
3745 |
ROOTRAWDEV=$(mount | grep "^${SEARCH} on " | \ |
|
3746 |
awk '{print $3}' | sed 's;/dsk;/rdsk;') |
|
3747 |
||
3748 |
if [ -z "${ROOTRAWDEV}" ] ; then |
|
3749 |
[ -n "${ROOTRAWDEV}" && echo "${ROOTRAWDEV}" ] |
|
3750 |
fail "${SEARCH} must be a mounted filesystem" |
|
3751 |
fi |
|
3752 |
||
3753 |
echo "Updating Solaris partition ${ROOTRAWDEV} with installboot" |
|
3754 |
REQFILES="pboot bootblk" |
|
3755 |
for f in ${REQFILES}; do |
|
3756 |
if [ ! -f ${TMPDIR}/$f ]; then |
|
3757 |
fail "Missing $f, aborting." |
|
3758 |
fi |
|
3759 |
done |
|
3760 |
PBOOT=${TMPDIR}/pboot |
|
3761 |
BOOTBLK=${TMPDIR}/bootblk |
|
3762 |
install_boot_i386 $PBOOT $BOOTBLK ${ROOTRAWDEV} |
|
3763 |
if [ $? -ne 0 ] ; then |
|
3764 |
fail "Unable to installboot to <${ROOTRAWDEV}>." |
|
3765 |
fi |
|
3766 |
fi |
|
3767 |
} |
|
3768 |
||
3769 |
print "Verifying archives ..." |
|
3770 |
||
3771 |
for a in generic $allarchs $rootarchs |
|
3772 |
do |
|
3773 |
test -r $cpiodir/$a.root$ZFIX || |
|
3774 |
fail "bfu archive $cpiodir/$a.root$ZFIX missing" |
|
3775 |
done |
|
3776 |
||
3777 |
if [ ! -r $cpiodir/generic.lib$ZFIX -o ! -r $cpiodir/generic.kernel$ZFIX -o \ |
|
3778 |
! -r $cpiodir/generic.sbin$ZFIX ]; then |
|
3779 |
old_style_archives="true" |
|
3780 |
$ZCAT $cpiodir/generic.root$ZFIX | cpio -it 2>/dev/null | \ |
|
3781 |
egrep -s '^etc/zones' && \ |
|
3782 |
fail "bfu archive $cpiodir/generic.{kernel,lib,sbin}$ZFIX" \ |
|
3783 |
"missing;\npossible mkbfu version mismatch: pre-zones" \ |
|
3784 |
"style archives with zones files." |
|
3785 |
fi |
|
3786 |
||
3787 |
for a in generic $allarchs $usrarchs |
|
3788 |
do |
|
3789 |
test -r $cpiodir/$a.usr$ZFIX || |
|
3790 |
fail "bfu archive $cpiodir/$a.usr$ZFIX missing" |
|
3791 |
done |
|
3792 |
||
3793 |
for root in $rootlist |
|
3794 |
do |
|
3795 |
cd $root || fail "Cannot cd $root" |
|
3796 |
prologue=${root%/}/bfu.prologue |
|
3797 |
if [ -f $prologue ]; then |
|
3798 |
print "Executing $prologue" |
|
3799 |
$prologue || fail "$prologue failed with code $?" |
|
3800 |
fi |
|
3801 |
done |
|
3802 |
||
3803 |
print "Performing basic sanity checks ..." |
|
3804 |
||
3805 |
for dir in $usr $rootlist |
|
3806 |
do |
|
3807 |
test -d $dir || fail "$dir does not exist" |
|
3808 |
test -w $dir || fail "$dir is not writable" |
|
3809 |
cd $dir || fail "Cannot cd $dir" |
|
3810 |
done |
|
3811 |
||
3812 |
RM_32BIT_KERNEL=0; |
|
3813 |
if [ "$karch" = "sun4u" ] && |
|
3814 |
($ZCAT $cpiodir/sun4u.root$ZFIX | cpio -itv 2>&1 | |
|
3815 |
grep "^l.*platform/sun4u/kernel/unix -> sparcv9/unix$" > /dev/null); |
|
3816 |
then |
|
3817 |
RM_32BIT_KERNEL=1; |
|
3818 |
if [ "$force_override" = "no" ] && |
|
3819 |
(prtconf -F 2>&1 | egrep '(cgthree|bwtwo)' > /dev/null); |
|
3820 |
then |
|
3821 |
print "\n\nERROR: You are upgrading to a 64-bit-only OS. " \ |
|
3822 |
"Your frame buffer does not have a 64-bit driver and " \ |
|
3823 |
"will not work after reboot. To proceed you must run " \ |
|
3824 |
"bfu with the -f flag."; |
|
3825 |
exit; |
|
3826 |
fi; |
|
3827 |
fi; |
|
3828 |
||
3829 |
if [ $plat = "SUNW,Ultra-1" ] && [ ! -f $cpiodir/SUNW,Ultra-1.root$ZFIX ] && |
|
3830 |
[ "$force_override" = "no" ]; |
|
3831 |
then |
|
3832 |
print "\nERROR: These archives do not have Ultra-1 platform support." \ |
|
3833 |
"\nProceeding with this BFU may render this machine unbootable." \ |
|
3834 |
"\nTo proceed anyway, you must run bfu with the -f flag.\n"; |
|
3835 |
exit; |
|
3836 |
fi; |
|
3837 |
||
3838 |
for root in $rootlist |
|
3839 |
do |
|
3840 |
rootprefix=${root%/} |
|
3841 |
smf_check_repository |
|
3842 |
done |
|
3843 |
||
3446 | 3844 |
MINIMUM_OS_REV=10 |
0 | 3845 |
|
3846 |
# |
|
3847 |
# Perform additional sanity checks if we are upgrading the live system. |
|
3848 |
# |
|
3849 |
if [ "$rootlist" = "/" ] |
|
3850 |
then |
|
3851 |
# |
|
3852 |
# Disallow from older releases |
|
3853 |
# |
|
3854 |
os_rev=`uname -r | sed -e s/5.//` |
|
3855 |
if [ $os_rev -lt $MINIMUM_OS_REV -a "$force_override" = "no" ]; then |
|
3856 |
fail "Cannot bfu from pre-Solaris $MINIMUM_OS_REV" |
|
3857 |
fi |
|
3446 | 3858 |
if [ ! -x /usr/sbin/svcadm ]; then |
3859 |
fail "This version of bfu cannot run on pre-Greenline " \ |
|
3860 |
"(s10_64) systems" |
|
3861 |
fi |
|
0 | 3862 |
|
3863 |
# |
|
3864 |
# Filesystem space checks |
|
3865 |
# |
|
3866 |
set $root 4 $usr 6 |
|
3867 |
while [ $# -gt 0 ] |
|
3868 |
do |
|
3869 |
test "`df -b $1 | tail -1 | nawk '{ print $2 }'`" -ge ${2}000 || |
|
3870 |
fail "Less than $2 MB free on $1 -- bfu not safe." |
|
3871 |
shift 2 |
|
3872 |
done |
|
3873 |
# |
|
3874 |
# Disable kernel module unloading |
|
3875 |
# |
|
3876 |
print "Disabling kernel module unloading ... \c" |
|
3877 |
test -x /usr/bin/adb || fail "/usr/bin/adb not found: bfu not safe." |
|
3878 |
echo "moddebug/W20000" | adb -kw /dev/ksyms /dev/mem | grep moddebug |
|
3879 |
# |
|
3880 |
# Load modules and drivers here not to reload them when you access |
|
3881 |
# /devices or its subdirectories later. |
|
3882 |
# |
|
2805
a4be0ff24d1f
6311701 /etc/minor_perm is ignored if it contains comments
eota
parents:
2712
diff
changeset
|
3883 |
nawk '$1 !~ /^#|^$/ {print $1}' /etc/name_to_major | \ |
a4be0ff24d1f
6311701 /etc/minor_perm is ignored if it contains comments
eota
parents:
2712
diff
changeset
|
3884 |
sed -e 's/#.*$//' | while read driver |
0 | 3885 |
do |
3886 |
modload -p drv/${driver} >/dev/null 2>&1 |
|
3887 |
done |
|
3888 |
ls $cpiodir >>/dev/null # loads elfexec and networking |
|
3889 |
||
3890 |
# exec/intpexec and sys/kaio are needed by lofi |
|
3891 |
modload -p exec/intpexec >/dev/null 2>&1 |
|
3892 |
modload -p sys/kaio >/dev/null 2>&1 |
|
3893 |
||
3894 |
# umount /lib/libc.so.1 if necessary |
|
3895 |
if [ -n "`mount | grep '^/lib/libc.so.1'`" ] |
|
3896 |
then |
|
3897 |
print "Unmounting /lib/libc.so.1 ..." |
|
3898 |
umount /lib/libc.so.1 |
|
3899 |
fi |
|
3900 |
||
1342
f161862f9539
6338660 sun4v libc_psr mount does not match the AUX vector in libc.so.1
ae112802
parents:
1253
diff
changeset
|
3901 |
PLAT=`/usr/bin/uname -i` |
f161862f9539
6338660 sun4v libc_psr mount does not match the AUX vector in libc.so.1
ae112802
parents:
1253
diff
changeset
|
3902 |
ARCH=`/usr/bin/uname -m` |
f161862f9539
6338660 sun4v libc_psr mount does not match the AUX vector in libc.so.1
ae112802
parents:
1253
diff
changeset
|
3903 |
# umount /platform/$PLAT/lib/libc_psr.so.1 if necessary |
f161862f9539
6338660 sun4v libc_psr mount does not match the AUX vector in libc.so.1
ae112802
parents:
1253
diff
changeset
|
3904 |
if [ -n "`mount | grep "^/platform/$PLAT/lib/libc_psr.so.1"`" ] |
0 | 3905 |
then |
1342
f161862f9539
6338660 sun4v libc_psr mount does not match the AUX vector in libc.so.1
ae112802
parents:
1253
diff
changeset
|
3906 |
print "Unmounting /platform/$PLAT/lib/libc_psr.so.1 ..." |
f161862f9539
6338660 sun4v libc_psr mount does not match the AUX vector in libc.so.1
ae112802
parents:
1253
diff
changeset
|
3907 |
umount /platform/$PLAT/lib/libc_psr.so.1 |
f161862f9539
6338660 sun4v libc_psr mount does not match the AUX vector in libc.so.1
ae112802
parents:
1253
diff
changeset
|
3908 |
else |
f161862f9539
6338660 sun4v libc_psr mount does not match the AUX vector in libc.so.1
ae112802
parents:
1253
diff
changeset
|
3909 |
# umount /platform/$ARCH/lib/libc_psr.so.1 if necessary |
f161862f9539
6338660 sun4v libc_psr mount does not match the AUX vector in libc.so.1
ae112802
parents:
1253
diff
changeset
|
3910 |
if [ -n "`mount | grep "^/platform/$ARCH/lib/libc_psr.so.1"`" ] |
f161862f9539
6338660 sun4v libc_psr mount does not match the AUX vector in libc.so.1
ae112802
parents:
1253
diff
changeset
|
3911 |
then |
f161862f9539
6338660 sun4v libc_psr mount does not match the AUX vector in libc.so.1
ae112802
parents:
1253
diff
changeset
|
3912 |
print "Unmounting /platform/$ARCH/lib/libc_psr.so.1 ..." |
f161862f9539
6338660 sun4v libc_psr mount does not match the AUX vector in libc.so.1
ae112802
parents:
1253
diff
changeset
|
3913 |
umount /platform/$ARCH/lib/libc_psr.so.1 |
f161862f9539
6338660 sun4v libc_psr mount does not match the AUX vector in libc.so.1
ae112802
parents:
1253
diff
changeset
|
3914 |
fi |
0 | 3915 |
fi |
3916 |
||
1342
f161862f9539
6338660 sun4v libc_psr mount does not match the AUX vector in libc.so.1
ae112802
parents:
1253
diff
changeset
|
3917 |
# umount /platform/$PLAT/lib/sparcv9/libc_psr.so.1 if necessary |
f161862f9539
6338660 sun4v libc_psr mount does not match the AUX vector in libc.so.1
ae112802
parents:
1253
diff
changeset
|
3918 |
if [ -n "`mount | grep "^/platform/$PLAT/lib/sparcv9/libc_psr.so.1"`" ] |
0 | 3919 |
then |
1342
f161862f9539
6338660 sun4v libc_psr mount does not match the AUX vector in libc.so.1
ae112802
parents:
1253
diff
changeset
|
3920 |
print "Unmounting /platform/$PLAT/lib/sparcv9/libc_psr.so.1 ..." |
f161862f9539
6338660 sun4v libc_psr mount does not match the AUX vector in libc.so.1
ae112802
parents:
1253
diff
changeset
|
3921 |
umount /platform/$PLAT/lib/sparcv9/libc_psr.so.1 |
f161862f9539
6338660 sun4v libc_psr mount does not match the AUX vector in libc.so.1
ae112802
parents:
1253
diff
changeset
|
3922 |
else |
f161862f9539
6338660 sun4v libc_psr mount does not match the AUX vector in libc.so.1
ae112802
parents:
1253
diff
changeset
|
3923 |
# umount /platform/$ARCH/lib/sparcv9/libc_psr.so.1 if necessary |
f161862f9539
6338660 sun4v libc_psr mount does not match the AUX vector in libc.so.1
ae112802
parents:
1253
diff
changeset
|
3924 |
if [ -n "`mount | grep \ |
f161862f9539
6338660 sun4v libc_psr mount does not match the AUX vector in libc.so.1
ae112802
parents:
1253
diff
changeset
|
3925 |
"^/platform/$ARCH/lib/sparcv9/libc_psr.so.1"`" ] |
f161862f9539
6338660 sun4v libc_psr mount does not match the AUX vector in libc.so.1
ae112802
parents:
1253
diff
changeset
|
3926 |
then |
f161862f9539
6338660 sun4v libc_psr mount does not match the AUX vector in libc.so.1
ae112802
parents:
1253
diff
changeset
|
3927 |
print "Unmounting \c" |
f161862f9539
6338660 sun4v libc_psr mount does not match the AUX vector in libc.so.1
ae112802
parents:
1253
diff
changeset
|
3928 |
print "/platform/$ARCH/lib/sparcv9/libc_psr.so.1 ..." |
f161862f9539
6338660 sun4v libc_psr mount does not match the AUX vector in libc.so.1
ae112802
parents:
1253
diff
changeset
|
3929 |
umount /platform/$ARCH/lib/sparcv9/libc_psr.so.1 |
f161862f9539
6338660 sun4v libc_psr mount does not match the AUX vector in libc.so.1
ae112802
parents:
1253
diff
changeset
|
3930 |
fi |
0 | 3931 |
fi |
3932 |
||
1177 | 3933 |
# umount /platform/sun4u-us3/lib/libc_psr.so.1 if necessary |
3934 |
if [ -n "`mount | grep '^/platform/sun4u-us3/lib/libc_psr.so.1'`" ] |
|
3935 |
then |
|
3936 |
print "Unmounting /platform/sun4u-us3/lib/libc_psr.so.1 ..." |
|
3937 |
umount /platform/sun4u-us3/lib/libc_psr.so.1 |
|
3938 |
fi |
|
3939 |
||
3940 |
# umount /platform/sun4u-us3/lib/sparcv9/libc_psr.so.1 if necessary |
|
3941 |
if [ -n "`mount | grep '^/platform/sun4u-us3/lib/sparcv9/libc_psr.so.1'`" ] |
|
3942 |
then |
|
3943 |
print "Unmounting /platform/sun4u-us3/lib/sparcv9/libc_psr.so.1 ..." |
|
3944 |
umount /platform/sun4u-us3/lib/sparcv9/libc_psr.so.1 |
|
3945 |
fi |
|
3946 |
||
0 | 3947 |
if [ -x /usr/sbin/zoneadm ]; then |
3948 |
# |
|
3949 |
# Stop any running zones: the init script will print a |
|
3950 |
# message if needed. |
|
3951 |
# |
|
3952 |
if [ -x /etc/init.d/zones ]; then |
|
3953 |
/etc/init.d/zones stop |
|
3954 |
elif [ -x /lib/svc/method/svc-zones ]; then |
|
3955 |
# |
|
2622
ffef85cab3c3
6464209 bfu shouldn't use .../method/svc-zones directly (6402848 broke bfu)
dp
parents:
2621
diff
changeset
|
3956 |
# We need all zones to be down before proceeding. |
ffef85cab3c3
6464209 bfu shouldn't use .../method/svc-zones directly (6402848 broke bfu)
dp
parents:
2621
diff
changeset
|
3957 |
# We can't accomplish this by just disabling the |
ffef85cab3c3
6464209 bfu shouldn't use .../method/svc-zones directly (6402848 broke bfu)
dp
parents:
2621
diff
changeset
|
3958 |
# zones service, since it might already be disabled. |
ffef85cab3c3
6464209 bfu shouldn't use .../method/svc-zones directly (6402848 broke bfu)
dp
parents:
2621
diff
changeset
|
3959 |
# So we pretend to be SMF, and invoke the stop method. |
0 | 3960 |
# |
2622
ffef85cab3c3
6464209 bfu shouldn't use .../method/svc-zones directly (6402848 broke bfu)
dp
parents:
2621
diff
changeset
|
3961 |
# When zones are someday independently managed as |
ffef85cab3c3
6464209 bfu shouldn't use .../method/svc-zones directly (6402848 broke bfu)
dp
parents:
2621
diff
changeset
|
3962 |
# service instances, this will need to be revised. |
ffef85cab3c3
6464209 bfu shouldn't use .../method/svc-zones directly (6402848 broke bfu)
dp
parents:
2621
diff
changeset
|
3963 |
# |
ffef85cab3c3
6464209 bfu shouldn't use .../method/svc-zones directly (6402848 broke bfu)
dp
parents:
2621
diff
changeset
|
3964 |
export SMF_FMRI="svc:/system/zones:default" |
0 | 3965 |
/lib/svc/method/svc-zones stop |
2622
ffef85cab3c3
6464209 bfu shouldn't use .../method/svc-zones directly (6402848 broke bfu)
dp
parents:
2621
diff
changeset
|
3966 |
unset SMF_FMRI |
0 | 3967 |
fi |
3968 |
||
3969 |
[ -z `zoneadm list | grep -v global` ] || \ |
|
3970 |
fail "zone(s) failed to halt" |
|
3971 |
# |
|
3972 |
# Determine the installed zones, which we will want to do |
|
3973 |
# after we're done with the global zone. This is done now |
|
3974 |
# rather than later in case bfu'ing the global zone causes |
|
3975 |
# the zone configuration to become unreadable (e.g., via a |
|
3976 |
# DTD flag day). |
|
3977 |
# |
|
3948
b8d304c37bf9
6535942 bfu and acr don't tolerate non-native zones other than 'lx'
dp
parents:
3893
diff
changeset
|
3978 |
bfu_zone_list=$root/.bfu_zone_list |
b8d304c37bf9
6535942 bfu and acr don't tolerate non-native zones other than 'lx'
dp
parents:
3893
diff
changeset
|
3979 |
rm -f $bfu_zone_list |
2364 | 3980 |
|
0 | 3981 |
zoneadm list -pi | nawk -F: '{ |
3948
b8d304c37bf9
6535942 bfu and acr don't tolerate non-native zones other than 'lx'
dp
parents:
3893
diff
changeset
|
3982 |
if ($3 == "installed" && |
b8d304c37bf9
6535942 bfu and acr don't tolerate non-native zones other than 'lx'
dp
parents:
3893
diff
changeset
|
3983 |
($6 == "native" || $6 == "" || $6 == "sn1")) { |
0 | 3984 |
printf "%s %s\n", $2, $4 |
3985 |
} |
|
3948
b8d304c37bf9
6535942 bfu and acr don't tolerate non-native zones other than 'lx'
dp
parents:
3893
diff
changeset
|
3986 |
}' > $bfu_zone_list |
0 | 3987 |
fi |
3988 |
||
3989 |
# |
|
3990 |
# Stop sendmail so that mail doesn't bounce during the interval |
|
3991 |
# where /etc/mail/aliases is (effectively) empty. |
|
3992 |
# |
|
3993 |
# (note that unlike other services here, /etc/init.d/sendmail |
|
3994 |
# remains post-smf(5) because it is a public interface.) |
|
3995 |
# |
|
3996 |
if [ -r /etc/svc/volatile/repository_door ]; then |
|
3997 |
print "Disabling sendmail temporarily ..." |
|
3998 |
svcadm disable -t network/smtp |
|
3999 |
else |
|
4000 |
print "Killing sendmail ..." |
|
4001 |
/etc/init.d/sendmail stop |
|
4002 |
fi |
|
4003 |
||
4004 |
print "Disabling remote logins ..." |
|
4005 |
echo "bfu in progress -- remote logins disabled" >/etc/nologin |
|
4006 |
||
4007 |
# |
|
4008 |
# Stop syslogd so it doesn't interfere with saving preserved files. |
|
4009 |
# |
|
4010 |
if [ -f /etc/init.d/syslog ]; then |
|
4011 |
print "Killing syslogd ..." |
|
4012 |
/etc/init.d/syslog stop |
|
4013 |
elif [ -r /etc/svc/volatile/repository_door ]; then |
|
4014 |
print "Disabling syslog temporarily ..." |
|
4015 |
svcadm disable -t system/system-log |
|
4016 |
fi |
|
4017 |
||
4018 |
# |
|
4019 |
# Stop apache so it doesn't get upset when the entire world changes |
|
4020 |
# out from underneath it. |
|
4021 |
# |
|
4022 |
if [ -f /etc/init.d/apache ]; then |
|
4023 |
print "Killing httpd ..." |
|
4024 |
/etc/init.d/apache stop |
|
4025 |
elif [ -r /etc/svc/volatile/repository_door ]; then |
|
4026 |
print "Disabling httpd temporarily ..." |
|
4027 |
svcadm disable -t network/http |
|
4028 |
fi |
|
4029 |
||
4030 |
# |
|
4031 |
# Kill off fmd so it doesn't get upset when the entire world changes |
|
4032 |
# out from underneath it. |
|
4033 |
# |
|
4034 |
if [ -f /etc/init.d/savecore ]; then |
|
4035 |
print "Killing fmd ..." |
|
4036 |
pkill -x fmd |
|
4037 |
elif [ -r /etc/svc/volatile/repository_door ]; then |
|
4038 |
print "Disabling fmd temporarily ..." |
|
4039 |
svcadm disable -t system/fmd |
|
4040 |
fi |
|
4041 |
||
4042 |
# |
|
4043 |
# Stop nscd so it doesn't interfere with stuff. |
|
4044 |
# |
|
4045 |
if [ -x /etc/init.d/nscd ]; then |
|
4046 |
print "Killing nscd ..." |
|
4047 |
/etc/init.d/nscd stop |
|
4048 |
elif [ -r /etc/svc/volatile/repository_door ]; then |
|
4049 |
print "Disabling nscd temporarily ..." |
|
4050 |
svcadm disable -t system/name-service-cache:default |
|
4051 |
fi |
|
4052 |
||
4053 |
if grep -v "^#" $rootprefix/etc/vfstab | grep boot | \ |
|
4054 |
grep "[ ]pcfs[ ]" >/dev/null 2>&1 |
|
4055 |
then |
|
4056 |
boot_is_pcfs=yes |
|
4057 |
fi |
|
4058 |
||
4059 |
smf_new_profiles |
|
4060 |
||
4061 |
else |
|
4062 |
# |
|
4063 |
# Check ${root}/etc/motd for SunOS value to get `uname -r` |
|
4064 |
# |
|
4065 |
os_rev=`head -1 ${root}/etc/motd | sed -e 's/^.*SunOS //' | \ |
|
4066 |
awk '{print $1}' | sed -e s/5.//` |
|
4067 |
if [ $os_rev -lt $MINIMUM_OS_REV -a "$force_override" = "no" ]; then |
|
4068 |
fail "Cannot bfu from pre-Solaris $MINIMUM_OS_REV" |
|
4069 |
fi |
|
3446 | 4070 |
if [ ! -x /usr/sbin/svcadm ]; then |
4071 |
fail "This version of bfu cannot run on pre-Greenline " \ |
|
4072 |
"(s10_64) systems" |
|
4073 |
fi |
|
0 | 4074 |
fi |
4075 |
||
4076 |
export PATH=/tmp/bfubin:$PATH |
|
4077 |
export LD_LIBRARY_PATH=/tmp/bfulib |
|
4078 |
||
4079 |
if [ -h /tmp/bfulib/64 ] |
|
4080 |
then |
|
4081 |
ldlib64="LD_LIBRARY_PATH_64=/tmp/bfulib/64" |
|
4082 |
export LD_LIBRARY_PATH_64=/tmp/bfulib/64 |
|
4083 |
fi |
|
4084 |
||
598
62a3fdbde968
6327152 bfuing over the fix for 6324631 can cause BFU/acr failures
jwadams
parents:
461
diff
changeset
|
4085 |
# turn off auxiliary filters, since they can cause objects to be loaded |
62a3fdbde968
6327152 bfuing over the fix for 6324631 can cause BFU/acr failures
jwadams
parents:
461
diff
changeset
|
4086 |
# from outside of the protected environment. |
62a3fdbde968
6327152 bfuing over the fix for 6324631 can cause BFU/acr failures
jwadams
parents:
461
diff
changeset
|
4087 |
export LD_NOAUXFLTR=1 |
62a3fdbde968
6327152 bfuing over the fix for 6324631 can cause BFU/acr failures
jwadams
parents:
461
diff
changeset
|
4088 |
|
62a3fdbde968
6327152 bfuing over the fix for 6324631 can cause BFU/acr failures
jwadams
parents:
461
diff
changeset
|
4089 |
# |
62a3fdbde968
6327152 bfuing over the fix for 6324631 can cause BFU/acr failures
jwadams
parents:
461
diff
changeset
|
4090 |
# Since we've turned off auxiliary filters, libc_psr will normally not |
62a3fdbde968
6327152 bfuing over the fix for 6324631 can cause BFU/acr failures
jwadams
parents:
461
diff
changeset
|
4091 |
# be loaded at all. But libc_psr was overriding broken code in libc |
62a3fdbde968
6327152 bfuing over the fix for 6324631 can cause BFU/acr failures
jwadams
parents:
461
diff
changeset
|
4092 |
# for over a week before the fix for 6324631, so we need to explicitly |
62a3fdbde968
6327152 bfuing over the fix for 6324631 can cause BFU/acr failures
jwadams
parents:
461
diff
changeset
|
4093 |
# LD_PRELOAD it to allow users to bfu from the broken libc. This can be |
62a3fdbde968
6327152 bfuing over the fix for 6324631 can cause BFU/acr failures
jwadams
parents:
461
diff
changeset
|
4094 |
# removed once there are no sun4u machines bfued to Nevada bits between |
62a3fdbde968
6327152 bfuing over the fix for 6324631 can cause BFU/acr failures
jwadams
parents:
461
diff
changeset
|
4095 |
# 9/7/2005 and 9/15/2005. |
62a3fdbde968
6327152 bfuing over the fix for 6324631 can cause BFU/acr failures
jwadams
parents:
461
diff
changeset
|
4096 |
# |
62a3fdbde968
6327152 bfuing over the fix for 6324631 can cause BFU/acr failures
jwadams
parents:
461
diff
changeset
|
4097 |
if [ -f /tmp/bfulib/libc_psr.so.1 ]; then |
62a3fdbde968
6327152 bfuing over the fix for 6324631 can cause BFU/acr failures
jwadams
parents:
461
diff
changeset
|
4098 |
export LD_PRELOAD_32=/tmp/bfulib/libc_psr.so.1 |
62a3fdbde968
6327152 bfuing over the fix for 6324631 can cause BFU/acr failures
jwadams
parents:
461
diff
changeset
|
4099 |
fi |
62a3fdbde968
6327152 bfuing over the fix for 6324631 can cause BFU/acr failures
jwadams
parents:
461
diff
changeset
|
4100 |
|
0 | 4101 |
print "Turning on delayed i/o ..." |
4102 |
fastfs -f $rootlist $usr |
|
4103 |
fastfs $rootlist $usr |
|
4104 |
||
4105 |
# |
|
4106 |
# The "| tee -a $EXTRACT_LOG" following do_extraction() is not pulled into the |
|
4107 |
# function itself because it interferes with the cpio exit status detection. |
|
4108 |
# pcfs boot is an exception, since its cpio exit status is expected to be bad, |
|
4109 |
# so a heuristic must be employed to infer whether or not any errors occurred. |
|
4110 |
# |
|
4111 |
do_extraction() { |
|
4112 |
compressed_archive=$1 |
|
4113 |
shift |
|
4114 |
$ZCAT $compressed_archive | cpio -idmucB $* 2>&1 \ |
|
4115 |
|| extraction_error "extracting archive $1" |
|
4116 |
} |
|
4117 |
||
4118 |
do_pcfs_boot_extraction() { |
|
4119 |
PCFS_BOOT_LOG=/tmp/bfu-pcfs-boot-log.$$ |
|
4120 |
$ZCAT $1 | cpio -idmucB 2>&1 | grep -v "error.s" | \ |
|
4121 |
grep -v "cpio: Cannot chown()" | \ |
|
4122 |
grep -v "cpio: Error during chown()" | tee $PCFS_BOOT_LOG |
|
4123 |
cat $PCFS_BOOT_LOG >> $EXTRACT_LOG |
|
4124 |
egrep -s -v blocks $PCFS_BOOT_LOG |
|
4125 |
if [ $? -eq 0 ]; then |
|
4126 |
extraction_error "extracting archive $1 ... see $PCFS_BOOT_LOG" |
|
4127 |
else |
|
4128 |
rm -f $PCFS_BOOT_LOG |
|
4129 |
fi |
|
4130 |
} |
|
4131 |
||
4132 |
# |
|
4133 |
# Usage: extract_archives (root|usr|lib|sbin|kernel) arch-list |
|
4134 |
# |
|
4135 |
extract_archives() { |
|
4136 |
base=$1 |
|
4137 |
shift |
|
4138 |
test $base = usr && cd $usrroot || cd $root |
|
4139 |
for archive in $* |
|
4140 |
do |
|
4141 |
print "Extracting $archive.$base$ZFIX ... \c" \ |
|
4142 |
| tee -a $EXTRACT_LOG |
|
4143 |
test -h platform/$archive && rm platform/$archive |
|
4144 |
if [ $base = root ]; then |
|
4145 |
exclude="-f dev/fd home proc etc/mnttab" |
|
3957 | 4146 |
exclude="$exclude etc/dfs/sharetab" |
0 | 4147 |
[ -d system/contract ] && |
4148 |
exclude="$exclude system/contract" |
|
4149 |
[ -d system/object ] && |
|
4150 |
exclude="$exclude system/object" |
|
4151 |
[ -f etc/svc/repository.db ] && |
|
4152 |
exclude="$exclude etc/svc/repository.db" |
|
4153 |
[ -e etc/repository_door ] && |
|
4154 |
exclude="$exclude etc/repository_door" |
|
4155 |
[ -f etc/svc/volatile ] && |
|
4156 |
exclude="$exclude etc/svc/volatile" |
|
4157 |
do_extraction $cpiodir/$archive.$base$ZFIX $exclude | |
|
4158 |
tee -a $EXTRACT_LOG |
|
4159 |
elif [ $base = usr ]; then |
|
4160 |
do_extraction $cpiodir/$archive.$base$ZFIX \ |
|
4161 |
-f "usr/openwin" | tee -a $EXTRACT_LOG |
|
4162 |
else |
|
4163 |
do_extraction $cpiodir/$archive.$base$ZFIX \ |
|
4164 |
| tee -a $EXTRACT_LOG |
|
4165 |
fi |
|
4166 |
done |
|
4167 |
cd $root |
|
4168 |
} |
|
4169 |
||
4170 |
extract_boot_archives() { |
|
4171 |
base=$1 |
|
4172 |
shift |
|
4173 |
cd $root |
|
4174 |
for archive in $* |
|
4175 |
do |
|
4176 |
if [ ! -f $cpiodir/$archive.$base$ZFIX ]; then |
|
4177 |
continue |
|
4178 |
fi |
|
4179 |
print "Extracting $archive.$base$ZFIX ... \c" \ |
|
4180 |
| tee -a $EXTRACT_LOG |
|
4181 |
if [ $boot_is_pcfs = yes ]; then |
|
4182 |
do_pcfs_boot_extraction $cpiodir/$archive.$base$ZFIX |
|
4183 |
else |
|
4184 |
do_extraction $cpiodir/$archive.$base$ZFIX | \ |
|
4185 |
tee -a $EXTRACT_LOG |
|
4186 |
fi |
|
4187 |
$ZCAT $cpiodir/$archive.$base$ZFIX | cpio -it 2>&1 | \ |
|
4188 |
grep "boot/solaris/devicedb/master" >/dev/null 2>&1 |
|
4189 |
if [ "$?" = "0" ]; then |
|
4190 |
have_realmode=yes |
|
4191 |
fi |
|
4192 |
done |
|
4193 |
cd $root |
|
4194 |
} |
|
4195 |
||
4196 |
# |
|
4197 |
# Classic boot pboot and bootblk compatibility with old archives |
|
4198 |
# |
|
4199 |
setup_pboot() |
|
4200 |
{ |
|
4201 |
NEWPBOOTDIR=$GATE/public/pboot |
|
4202 |
NEWPBOOT=${NEWPBOOTDIR}/pboot |
|
4203 |
NEWBOOTBLK=${NEWPBOOTDIR}/bootblk |
|
4204 |
PBOOTDIR=$usr/platform/$karch/lib/fs/ufs |
|
4205 |
PBOOT=${PBOOTDIR}/pboot |
|
4206 |
BOOTBLK=${PBOOTDIR}/bootblk |
|
4207 |
||
4208 |
# they should already be there, but... |
|
4209 |
if [ -f $NEWPBOOT -a ! -f $PBOOT ]; then |
|
4210 |
print "Installing pboot from $NEWPBOOTDIR" |
|
4211 |
cp $NEWPBOOT $PBOOT |
|
4212 |
fi |
|
4213 |
if [ -f $NEWBOOTBLK -a ! -f $BOOTBLK ]; then |
|
4214 |
print "Installing bootblk from $NEWPBOOTDIR" |
|
4215 |
cp $NEWBOOTBLK $BOOTBLK |
|
4216 |
fi |
|
4217 |
||
4218 |
if [ -f $NEWPBOOT -a -f $PBOOT ]; then |
|
4219 |
LATEST=`ls -Lt $PBOOT $NEWPBOOT | head -1` |
|
4220 |
if [ "$LATEST" = "$NEWPBOOT" ]; then |
|
4221 |
print "Updating pboot from $NEWPBOOT" |
|
4222 |
cp $NEWPBOOT $PBOOT |
|
4223 |
fi |
|
4224 |
fi |
|
4225 |
if [ -f $NEWBOOTBLK -a -f $BOOTBLK ]; then |
|
4226 |
LATEST=`ls -Lt $BOOTBLK $NEWBOOTBLK | head -1` |
|
4227 |
if [ "$LATEST" = "$NEWBOOTBLK" ]; then |
|
4228 |
print "Updating bootblk from $NEWBOOTBLK" |
|
4229 |
cp $NEWBOOTBLK $BOOTBLK |
|
4230 |
fi |
|
4231 |
fi |
|
4232 |
if [[ "$rootslice" = /dev/rdsk/* ]]; then |
|
4233 |
print "Installing boot block." |
|
4234 |
( cd $PBOOTDIR ; |
|
4235 |
install_boot_i386 ./pboot ./bootblk ${rootslice%??}s2 ) |
|
4236 |
fi |
|
4237 |
# |
|
4238 |
# Since /platform/i86pc/boot/solaris/boot.bin is moved |
|
4239 |
# to /boot/solaris, remove the old one if it really |
|
4240 |
# exists. |
|
4241 |
# |
|
4242 |
OLDBOOTDIR=${root}/platform/i86pc/boot/solaris |
|
4243 |
OLDBOOTBIN=${OLDBOOTDIR}/boot.bin |
|
4244 |
if [ ! -h ${OLDBOOTDIR} -a -f ${OLDBOOTBIN} ] ; |
|
4245 |
then |
|
4246 |
print "Removing old boot.bin." |
|
4247 |
rm -rf ${OLDBOOTBIN} |
|
4248 |
fi |
|
4249 |
} |
|
4250 |
||
4251 |
# |
|
4252 |
# Multiboot support |
|
4253 |
# |
|
4254 |
||
4255 |
saved_boot_files=" |
|
4256 |
solaris/bootenv.rc |
|
4257 |
solaris/devicedb/master |
|
4258 |
" |
|
4259 |
||
4260 |
# |
|
4261 |
# transition from multiboot to dca |
|
4262 |
# |
|
4263 |
check_multi_to_dca_boot() |
|
4264 |
{ |
|
4265 |
bootdev=`grep p0:boot $rootprefix/etc/vfstab | \ |
|
4266 |
grep pcfs | nawk '{print $1}'` |
|
4267 |
if [ "$bootdev" != "" ]; then |
|
4268 |
is_pcfs_boot=yes |
|
4269 |
fi |
|
4270 |
||
4271 |
if [ $is_pcfs_boot = yes ]; then |
|
4272 |
df -h | grep stubboot >/dev/null 2>&1 |
|
4273 |
if [ $? -eq 0 ]; then |
|
4274 |
||
4275 |
# save configurable files from /boot |
|
4276 |
# before remounting /stubboot. |
|
4277 |
# files are relative to /boot. |
|
4278 |
for file in $saved_boot_files |
|
4279 |
do |
|
997 | 4280 |
dir="`dirname $rootprefix/stubboot/$file`" |
0 | 4281 |
mkdir -p $dir |
4282 |
cp $rootprefix/boot/$file $dir |
|
4283 |
done |
|
4284 |
||
4285 |
echo "unmount $bootdev at $rootprefix/stubboot" |
|
4286 |
ERRMSG=$(umount $bootdev 2>&1) |
|
4287 |
if [ $? -ne 0 ] ; then |
|
4288 |
[ -n "${ERRMSG}" ] && echo "${ERRMSG}" |
|
4289 |
fail "Unable to umount $bootdev on $rootprefix/stubboot." |
|
4290 |
fi |
|
4291 |
||
4292 |
# adjust vfstab |
|
4293 |
sed -e "s/[ ]\/stubboot[ ]/ \/boot /" \ |
|
4294 |
<$rootprefix/etc/vfstab >$rootprefix/etc/vfstab+ |
|
4295 |
mv $rootprefix/etc/vfstab $rootprefix/etc/vfstab- |
|
4296 |
mv $rootprefix/etc/vfstab+ $rootprefix/etc/vfstab |
|
4297 |
||
4298 |
ERRMSG=$(mount -F pcfs $bootdev $rootprefix/boot 2>&1) |
|
4299 |
if [ $? -ne 0 ] ; then |
|
4300 |
[ -n "${ERRMSG}" ] && echo "${ERRMSG}" |
|
4301 |
fail "Unable to mount $bootdev on $rootprefix/boot." |
|
4302 |
fi |
|
4303 |
fi |
|
4304 |
fi |
|
4305 |
} |
|
4306 |
||
4307 |
check_dca_to_multiboot() |
|
4308 |
{ |
|
3446 | 4309 |
bootdev=`grep p0:boot $rootprefix/etc/vfstab | \ |
4310 |
grep pcfs | nawk '{print $1}'` |
|
4311 |
if [ "$bootdev" != "" ]; then |
|
4312 |
is_pcfs_boot=yes |
|
4313 |
fi |
|
4314 |
if [ $system_type != dca ]; then |
|
4315 |
return |
|
4316 |
fi |
|
4317 |
||
0 | 4318 |
# ensure bootpath is in $rootprefix/boot/solaris/bootenv.rc |
4319 |
# It's ok to put a meta device path in there |
|
4320 |
bootenvrc=$rootprefix/boot/solaris/bootenv.rc |
|
4321 |
grep "^setprop[ ]*bootpath[ ]" $bootenvrc > /dev/null |
|
4322 |
if [ $? != 0 ]; then |
|
4323 |
rootdev=`grep -v "^#" $rootprefix/etc/vfstab | \ |
|
4324 |
grep "[ ]/[ ]" | nawk '{print $1}'` |
|
4325 |
bootpath=`ls -l $rootdev | nawk '{ print $NF }' |\ |
|
4326 |
sed "s#../../devices##"` |
|
4327 |
echo "setprop bootpath '$bootpath'" >> $bootenvrc |
|
4328 |
fi |
|
4329 |
||
4330 |
rm -f $rootprefix/boot/mdboot |
|
4331 |
} |
|
4332 |
||
4333 |
# |
|
3446 | 4334 |
# Figure out the boot architecture of the current system: |
4335 |
# 1. If dboot_image is in unix, it's a dboot system |
|
4336 |
# 2. Otherwise, if multiboot is present, it's a multiboot system |
|
4337 |
# 3. Otherwise, it's a pre-multiboot system |
|
4338 |
# |
|
4339 |
# This is called before we lay down the new archives. |
|
4340 |
# |
|
4341 |
check_system_type() |
|
4342 |
{ |
|
4343 |
if [ -x $root/boot/solaris/bin/symdef ] && \ |
|
4344 |
$root/boot/solaris/bin/symdef $root/platform/i86pc/kernel/unix \ |
|
4345 |
dboot_image; then |
|
4346 |
system_type=directboot |
|
4347 |
elif [ -x $root/platform/i86pc/multiboot ]; then |
|
4348 |
system_type=multiboot |
|
4349 |
else |
|
4350 |
system_type=dca |
|
4351 |
fi |
|
4352 |
} |
|
4353 |
||
4354 |
# |
|
0 | 4355 |
# Detect SVM root and return the list of raw devices under the mirror |
4356 |
# |
|
4357 |
get_rootdev_list() |
|
4358 |
{ |
|
3446 | 4359 |
if [ -f $rootprefix/etc/lu/GRUB_slice ]; then |
4360 |
grep '^PHYS_SLICE' $rootprefix/etc/lu/GRUB_slice | cut -d= -f2 |
|
4361 |
else |
|
4362 |
metadev=`grep -v "^#" $rootprefix/etc/vfstab | \ |
|
4363 |
grep "[ ]/[ ]" | nawk '{print $2}'` |
|
4364 |
if [[ $metadev = /dev/rdsk/* ]]; then |
|
4365 |
rootdevlist=`echo "$metadev" | sed -e "s#/dev/rdsk/##"` |
|
4366 |
elif [[ $metadev = /dev/md/rdsk/* ]]; then |
|
4367 |
metavol=`echo "$metadev" | sed -e "s#/dev/md/rdsk/##"` |
|
4368 |
rootdevlist=`metastat -p $metavol |\ |
|
4369 |
grep -v "^$metavol[ ]" | nawk '{print $4}'` |
|
4370 |
fi |
|
4371 |
for rootdev in $rootdevlist |
|
4372 |
do |
|
4373 |
echo /dev/rdsk/$rootdev |
|
4374 |
done |
|
4375 |
fi |
|
0 | 4376 |
} |
4377 |
||
4378 |
# |
|
4379 |
# Done once per transition from classic (dca) to multi boot |
|
4380 |
# |
|
4381 |
setup_stubboot() |
|
4382 |
{ |
|
4383 |
bootdev=`grep -v "^#" $rootprefix/etc/vfstab | grep pcfs | \ |
|
4384 |
grep "[ ]/boot[ ]"` |
|
4385 |
if [[ -n $bootdev ]] ; then |
|
4386 |
||
4387 |
bootdev=`echo "$bootdev" | nawk '{print $1}'` |
|
4388 |
rbootdev=`echo "$bootdev" | sed -e "s/dev\/dsk/dev\/rdsk/"` |
|
4389 |
||
4390 |
# Remount boot partition as /stubboot, set up new /boot |
|
4391 |
mkdir -p $rootprefix/stubboot |
|
4392 |
||
4393 |
ERRMSG=$(umount $bootdev 2>&1) |
|
4394 |
if [ $? -ne 0 ] ; then |
|
4395 |
[ -n "${ERRMSG}" ] && echo "${ERRMSG}" |
|
4396 |
fail "Unable to umount $bootdev." |
|
4397 |
fi |
|
4398 |
ERRMSG=$(mount -F pcfs $bootdev $rootprefix/stubboot 2>&1) |
|
4399 |
if [ $? -ne 0 ] ; then |
|
4400 |
[ -n "${ERRMSG}" ] && echo "${ERRMSG}" |
|
4401 |
fail "Unable to mount $bootdev on $rootprefix/stubboot." |
|
4402 |
fi |
|
4403 |
||
4404 |
mkdir -p $rootprefix/boot |
|
4405 |
cp -r $rootprefix/stubboot/* $rootprefix/boot |
|
4406 |
||
4407 |
# adjust /etc/vfstab |
|
4408 |
sed <$rootprefix/etc/vfstab \ |
|
4409 |
-e "s/[ ]\/boot[ ]/ \/stubboot /" | \ |
|
4410 |
sed -n >$rootprefix/etc/vfstab+ ' |
|
4411 |
/p0:boot/ { |
|
4412 |
s/[ ]no/ yes/ |
|
4413 |
} |
|
4414 |
p |
|
4415 |
' |
|
4416 |
||
4417 |
mv $rootprefix/etc/vfstab $rootprefix/etc/vfstab- |
|
4418 |
mv $rootprefix/etc/vfstab+ $rootprefix/etc/vfstab |
|
4419 |
fi |
|
4420 |
} |
|
4421 |
||
4422 |
# |
|
4423 |
# multiboot: install grub on the boot slice |
|
4424 |
# |
|
4425 |
install_grub() |
|
4426 |
{ |
|
3446 | 4427 |
STAGE1=$rootprefix/boot/grub/stage1 |
4428 |
STAGE2=$rootprefix/boot/grub/stage2 |
|
4429 |
||
4430 |
if [ -x $rootprefix/boot/solaris/bin/update_grub ]; then |
|
4431 |
/tmp/bfubin/ksh $rootprefix/boot/solaris/bin/update_grub \ |
|
4432 |
-R $root |
|
4433 |
elif [ $is_pcfs_boot = no ]; then |
|
0 | 4434 |
get_rootdev_list | while read rootdev |
4435 |
do |
|
4436 |
print "Install grub on $rootdev" |
|
4437 |
PATH=/tmp/bfubin /tmp/bfubin/installgrub \ |
|
4438 |
$STAGE1 $STAGE2 $rootdev |
|
4439 |
done |
|
4440 |
else |
|
4441 |
# copy /boot grub & solaris to /stubboot |
|
4442 |
cp -r $rootprefix/boot/grub $rootprefix/stubboot/grub |
|
4443 |
cp -r $rootprefix/boot/solaris $rootprefix/stubboot/solaris |
|
4444 |
||
4445 |
# Adjust grub paths relative to pcfs filesystem |
|
4446 |
rm -rf $rootprefix/stubboot/boot |
|
4447 |
mkdir -p $rootprefix/stubboot/boot |
|
4448 |
mv $rootprefix/stubboot/grub $rootprefix/stubboot/boot |
|
4449 |
mv $rootprefix/stubboot/solaris $rootprefix/stubboot/boot |
|
4450 |
||
4451 |
# |
|
4452 |
# Run installgrub after copying stubboot to avoid overwriting |
|
4453 |
# /stubboot/boot/grub/stage2, which must stay untouched. |
|
4454 |
# |
|
4455 |
bootdev=`grep -v "^#" $rootprefix/etc/vfstab | grep pcfs | \ |
|
4456 |
grep "[ ]/stubboot[ ]" | nawk '{print $1}'` |
|
4457 |
rbootdev=`echo "$bootdev" | sed -e "s/dev\/dsk/dev\/rdsk/"` |
|
4458 |
if [ "$rbootdev" != "" ]; then |
|
4459 |
print "Install grub on $rbootdev" |
|
4460 |
PATH=/tmp/bfubin /tmp/bfubin/installgrub $STAGE1 $STAGE2 $rbootdev |
|
4461 |
fi |
|
4462 |
fi |
|
4463 |
} |
|
4464 |
||
3446 | 4465 |
# |
4466 |
# We check for several possibilites of a bootenv.rc line: |
|
4467 |
# |
|
4468 |
# 1. setprop name 'value' |
|
4469 |
# 2. setprop name "value" |
|
4470 |
# 3. setprop name value |
|
4471 |
# |
|
4472 |
parse_bootenv_line() |
|
4473 |
{ |
|
4474 |
line=$1 |
|
4475 |
value=`echo $line | grep "'" | cut -d\' -f2` |
|
4476 |
if [ -z "$value" ]; then |
|
4477 |
value=`echo $line | grep "\"" | cut -d\" -f2` |
|
4478 |
if [ -z "$value" ]; then |
|
4479 |
value=`echo $line | cut -d' ' -f3-` |
|
4480 |
fi |
|
4481 |
fi |
|
4482 |
echo $value |
|
4483 |
} |
|
4484 |
||
4485 |
update_bootenv() |
|
4486 |
{ |
|
4487 |
bootenvrc=$rootprefix/boot/solaris/bootenv.rc |
|
4488 |
bootenvrc_updated=0 |
|
4489 |
||
4490 |
# Note: the big space below is actually a space and tab |
|
4491 |
boot_file=`grep '^setprop[ ]\{1,\}boot-file\>' $bootenvrc` |
|
4492 |
if [ -n "$boot_file" ]; then |
|
4493 |
file=`parse_bootenv_line "$boot_file"` |
|
4494 |
if [ -n "$file" ]; then |
|
4495 |
PATH=/tmp/bfubin /tmp/bfubin/bootadm set-menu kernel="$file" |
|
4496 |
bootenvrc_updated=1 |
|
4497 |
fi |
|
4498 |
fi |
|
4499 |
||
4500 |
console=`grep '^setprop[ ]\{1,\}console\>' $bootenvrc` |
|
4501 |
if [ -z "$console" ]; then |
|
4502 |
console=`grep '^setprop[ ]\{1,\}input-device\>' \ |
|
4503 |
$bootenvrc` |
|
4504 |
fi |
|
4505 |
if [ -n "$console" ]; then |
|
4506 |
cons=`parse_bootenv_line "$console"` |
|
4507 |
fi |
|
4508 |
boot_args=`grep '^setprop[ ]\{1,\}boot-args\>' $bootenvrc` |
|
4509 |
if [ -n "boot_args" ]; then |
|
4510 |
args=`parse_bootenv_line "$boot_args"` |
|
4511 |
fi |
|
4512 |
if [ -n "$cons" ] && [ -n "$args" ]; then |
|
4513 |
# If args starts with a -B, remove it and add a comma instead |
|
4514 |
if echo $args | grep '^-B ' >/dev/null; then |
|
4515 |
new_args=`echo $args | sed 's/^-B //'` |
|
4516 |
args_line="-B console=$cons,$new_args" |
|
4517 |
else |
|
4518 |
args_line="-B console=$cons $args" |
|
4519 |
fi |
|
4520 |
elif [ -n "$cons" ]; then |
|
4521 |
args_line="-B console=$cons" |
|
4522 |
elif [ -n "$args" ]; then |
|
4523 |
args_line="$args" |
|
4524 |
else |
|
4525 |
args_line="" |
|
4526 |
fi |
|
4527 |
if [ -n "$args_line" ]; then |
|
4528 |
PATH=/tmp/bfubin /tmp/bfubin/bootadm set-menu args="$args_line" |
|
4529 |
bootenvrc_updated=1 |
|
4530 |
fi |
|
4531 |
||
4532 |
if [ $bootenvrc_updated = 1 ]; then |
|
4533 |
egrep -v '^setprop[ ]+(console|boot-file|boot-args|input-device)[ ]' $bootenvrc > ${bootenvrc}.new |
|
4534 |
[ -s ${bootenvrc}.new ] && mv ${bootenvrc}.new $bootenvrc |
|
4535 |
fi |
|
4536 |
} |
|
4537 |
||
0 | 4538 |
get_biosdisk() |
4539 |
{ |
|
4540 |
rootdev=$1 |
|
4541 |
rootphys=`ls -l $rootdev | nawk '{ print $NF }' | \ |
|
4542 |
sed -e "s/\.\.\/\.\.\/devices//" -e "s/:[abcdefgh],raw//"` |
|
4543 |
rbootdev=`echo "$rootdev" | sed -e "s/s[0-7]/p0/"` |
|
4544 |
||
4545 |
# |
|
4546 |
# Use biosdev to get the bios disk number |
|
4547 |
# |
|
4548 |
biosdisk=`biosdev | grep $rootphys | \ |
|
4549 |
nawk '{print $1}' | sed -e "s/0x8//"` |
|
4550 |
} |
|
4551 |
||
4552 |
# |
|
4553 |
# multiboot: set up initial grub menu |
|
4554 |
# |
|
4555 |
update_grub_menu() |
|
4556 |
{ |
|
4557 |
MENU=$rootprefix/boot/grub/menu.lst |
|
4558 |
||
4559 |
grubhd=$1 |
|
4560 |
||
3446 | 4561 |
if [ $archive_type = multiboot ]; then |
4562 |
BOOT_PROG="kernel /platform/i86pc/multiboot" |
|
4563 |
BOOT_ARCHIVE="module /platform/i86pc/boot_archive" |
|
4564 |
else |
|
4565 |
# |
|
4566 |
# directboot archives |
|
4567 |
# |
|
4568 |
BOOT_PROG="kernel\$ /platform/i86pc/kernel/\$ISADIR/unix" |
|
4569 |
BOOT_ARCHIVE="module\$ /platform/i86pc/\$ISADIR/boot_archive" |
|
4570 |
fi |
|
4571 |
||
4572 |
# |
|
4573 |
# The failsafe archives may be different than the boot archives |
|
4574 |
# |
|
4575 |
if [ -x /boot/platform/i86pc/kernel/unix ]; then |
|
4576 |
BOOT_FAILSAFE_FILE="/boot/platform/i86pc/kernel/unix" |
|
4577 |
BOOT_FAILSAFE_SUFFIX="" |
|
4578 |
else |
|
4579 |
BOOT_FAILSAFE_FILE="/boot/multiboot" |
|
4580 |
BOOT_FAILSAFE_SUFFIX="kernel/unix" |
|
4581 |
fi |
|
4582 |
||
0 | 4583 |
# |
4584 |
# Append some useful entries to the existing menu |
|
4585 |
# |
|
4586 |
echo "Update GRUB menu $MENU with entries for $grubhd" |
|
4587 |
||
4588 |
grep ^default $MENU > /dev/null |
|
4589 |
[ $? = 0 ] || echo "default=0" >> $MENU |
|
4590 |
grep ^timeout $MENU > /dev/null |
|
4591 |
[ $? = 0 ] || echo "timeout=10" >> $MENU |
|
4592 |
||
4593 |
echo "#serial --unit=0 --speed=9600" >> $MENU |
|
4594 |
echo "#terminal serial" >> $MENU |
|
4595 |
echo "#splashimage=$grubhd/boot/grub/splash.xpm.gz" >> $MENU |
|
4596 |
echo "title Solaris" >> $MENU |
|
4597 |
echo " root $grubhd" >> $MENU |
|
3446 | 4598 |
echo " ${BOOT_PROG}" >> $MENU |
4599 |
echo " ${BOOT_ARCHIVE}" >> $MENU |
|
0 | 4600 |
|
4601 |
echo "GRUB menu entry 'Solaris' boots to eeprom(1m) settings" |
|
4602 |
||
3446 | 4603 |
if [ -f ${rootprefix}/$BOOT_FAILSAFE_FILE ] && |
0 | 4604 |
[ -f ${rootprefix}/boot/x86.miniroot-safe ] ; then |
4605 |
||
4606 |
TTY=`grep "^setprop input-device" \ |
|
4607 |
${rootprefix}/boot/solaris/bootenv.rc | cut -f 2 -d \'` |
|
4608 |
if [ -z "${TTY}" ] ; then |
|
4609 |
TTY=`grep "^setprop console" \ |
|
4610 |
${rootprefix}/boot/solaris/bootenv.rc | \ |
|
4611 |
cut -f 2 -d \'` |
|
4612 |
fi |
|
4613 |
||
4614 |
if [ "${TTY}" = "ttya" ] || [ "${TTY}" = "ttyb" ] ; then |
|
4615 |
FS_CONSOLE="-B console=${TTY}" |
|
4616 |
fi |
|
4617 |
||
3446 | 4618 |
cat >>$MENU <<EOF |
4619 |
title Solaris failsafe |
|
4620 |
root $grubhd |
|
4621 |
kernel $BOOT_FAILSAFE_FILE $BOOT_FAILSAFE_SUFFIX $FS_CONSOLE -s |
|
4622 |
module /boot/x86.miniroot-safe |
|
4623 |
EOF |
|
0 | 4624 |
fi |
4625 |
} |
|
4626 |
||
3446 | 4627 |
bootadm_f_flag="" |
4628 |
||
0 | 4629 |
install_failsafe() |
4630 |
{ |
|
3446 | 4631 |
if [ "$root" != "/" ] || \ |
4632 |
[ -f /boot/x86.miniroot-safe ] || \ |
|
3467 | 4633 |
[ ! -x ${GATEPATH}/public/bin/update_failsafe ]; then |
3446 | 4634 |
# |
4635 |
# Either we're not bfu'ing /, or the failsafe archives were |
|
4636 |
# already installed, or update_failsafe is not available. |
|
4637 |
# If the old failsafe archives were multiboot, clear out the |
|
4638 |
# directboot kernel. |
|
4639 |
# |
|
4640 |
if [ $failsafe_type = multiboot ]; then |
|
4641 |
rm -f $rootprefix/boot/platform/i86pc/kernel/unix |
|
4642 |
fi |
|
4643 |
else |
|
4644 |
echo "Updating failsafe archives" |
|
0 | 4645 |
${GATEPATH}/public/bin/update_failsafe |
3446 | 4646 |
|
4647 |
# Force bootadm to update the failsafe entry |
|
4648 |
bootadm_f_flag="-f" |
|
0 | 4649 |
fi |
4650 |
} |
|
4651 |
||
4652 |
setup_grub_menu() |
|
4653 |
{ |
|
4654 |
MENU=$rootprefix/boot/grub/menu.lst |
|
4655 |
||
4656 |
get_rootdev_list | while read rootdev |
|
4657 |
do |
|
4658 |
rootphys=`ls -l $rootdev | nawk '{print $NF}' | \ |
|
4659 |
sed -e "s/\.\.\/\.\.\/devices//"` |
|
4660 |
gslice=`echo "$rootphys" | cut -f 2 -d : | sed s/,raw//` |
|
4661 |
rootphys=`echo "$rootphys" | sed -e "s/:[abcdefgh],raw//"` |
|
4662 |
rbootdev=`echo "$rootdev" | sed -e "s/s[0-7]/p0/"` |
|
4663 |
||
4664 |
# |
|
4665 |
# Wallow through fdisk to get the active partition number |
|
4666 |
# Partition numbering is zero-based |
|
4667 |
# |
|
4668 |
part=0 |
|
4669 |
fdisk -W - $rbootdev | grep -v '^*' | grep -v '^$' | \ |
|
4670 |
while read id act bhead bcyl ehead ecyl rsect numsect |
|
4671 |
do |
|
4672 |
# Find solaris partition, either older 130 or 191 |
|
4673 |
if [ $id -eq "191" -o $id -eq "130" ] ; then |
|
4674 |
break |
|
4675 |
fi |
|
4676 |
part=`expr "$part" + 1` |
|
4677 |
done |
|
4678 |
||
4679 |
get_biosdisk $rootdev |
|
4680 |
grubhd="(hd${biosdisk},${part},${gslice})" |
|
4681 |
||
4682 |
# |
|
4683 |
# update the grub menu if it doesn't exist or |
|
4684 |
# doesn't have usable boot entries |
|
4685 |
# |
|
4686 |
if [ -f $MENU ]; then |
|
4687 |
grep -v "^#" $MENU | grep $grubhd >/dev/null 2>&1 |
|
4688 |
if [ $? -eq 1 ]; then |
|
4689 |
update_grub_menu $grubhd |
|
4690 |
fi |
|
4691 |
else |
|
4692 |
update_grub_menu $grubhd |
|
4693 |
fi |
|
4694 |
done |
|
4695 |
} |
|
4696 |
||
4697 |
# |
|
4698 |
# Build the multiboot boot archive |
|
4699 |
# |
|
4700 |
build_boot_archive() |
|
4701 |
{ |
|
4702 |
# |
|
4703 |
# We should be able to run bootadm here but that's a |
|
4704 |
# little more complicated than one would think |
|
4705 |
#bootadm_args=${rootprefix:+-R $rootprefix} |
|
4706 |
#PATH=/tmp/bfubin /tmp/bfubin/bootadm update $bootadm_args |
|
4707 |
||
4708 |
cr_args=${rootprefix:+ -R $rootprefix} |
|
4709 |
LD_LIBRARY_PATH=/tmp/bfulib PATH=/tmp/bfubin \ |
|
3446 | 4710 |
/tmp/bfubin/ksh $rootprefix/boot/solaris/bin/create_ramdisk $cr_args |
0 | 4711 |
|
4712 |
# |
|
4713 |
# Disable the boot-archive service on the first boot |
|
4714 |
# to silence complaints about new files |
|
4715 |
# svccfg -s system/boot-archive setprop start/exec = true |
|
4716 |
||
12
606827e00c98
6281986 bfu on alt mount fails to set up boot-archive conflicts correctly
jg
parents:
0
diff
changeset
|
4717 |
mkdir -p $rootprefix/bfu.conflicts/lib/svc/method |
0 | 4718 |
cp $rootprefix/lib/svc/method/boot-archive \ |
4719 |
$rootprefix/bfu.conflicts/lib/svc/method/boot-archive |
|
4720 |
cat >$rootprefix/lib/svc/method/boot-archive <<"EOF" |
|
4721 |
#!/sbin/sh |
|
4722 |
exit 0 |
|
4723 |
EOF |
|
4724 |
||
4725 |
cat >$rootprefix/etc/rc2.d/S99postbfu <<EOF |
|
4726 |
#!/bin/sh |
|
4727 |
# |
|
4728 |
case "\$1" in |
|
4729 |
'start') |
|
4730 |
cp /bfu.conflicts/lib/svc/method/boot-archive /lib/svc/method/boot-archive |
|
4731 |
chmod +x /lib/svc/method/boot-archive |
|
4732 |
rm -f /etc/rc2.d/S99postbfu |
|
4733 |
;; |
|
4734 |
*) |
|
4735 |
echo "usage: \$0 start" |
|
4736 |
exit 1 |
|
4737 |
;; |
|
4738 |
esac |
|
4739 |
exit 0 |
|
4740 |
EOF |
|
4741 |
||
4742 |
chmod +x $rootprefix/etc/rc2.d/S99postbfu |
|
4743 |
chmod +x $rootprefix/lib/svc/method/boot-archive |
|
4744 |
chmod +x $rootprefix/bfu.conflicts/lib/svc/method/boot-archive |
|
4745 |
} |
|
4746 |
||
4747 |
disable_boot_service() |
|
4748 |
{ |
|
4749 |
svccfg -s system/boot-archive setprop start/exec = true |
|
4750 |
cat >$rootprefix/lib/svc/method/boot-archive <<EOF |
|
4751 |
#!/sbin/sh |
|
4752 |
. /lib/svc/share/smf_include.sh |
|
4753 |
. /lib/svc/share/fs_include.sh |
|
4754 |
exit 0 |
|
4755 |
EOF |
|
4756 |
} |
|
4757 |
||
1872 | 4758 |
dir_is_inherited() { |
4759 |
dir=$1 |
|
4760 |
set -- `zonecfg -z $zone info inherit-pkg-dir dir=/$dir` |
|
4761 |
[ "$3" = "/$dir" ] && return 0 || return 1 |
|
4762 |
} |
|
4763 |
||
3446 | 4764 |
check_boot_env() |
4765 |
{ |
|
4766 |
if [ $multi_or_direct = yes ]; then |
|
4767 |
if [ $archive_type != $system_type ]; then |
|
4768 |
install_failsafe |
|
4769 |
[ $system_type = dca ] && setup_grub_menu |
|
4770 |
||
4771 |
if [ $have_new_bootadm = yes ] || \ |
|
4772 |
[ -x /tmp/bfubin/symdef ] && \ |
|
4773 |
[ -x /tmp/bfubin/bootadm ] && \ |
|
4774 |
/tmp/bfubin/symdef /tmp/bfubin/bootadm \ |
|
4775 |
dboot_or_multiboot; then |
|
4776 |
if [[ -z $rootprefix ]]; then |
|
4777 |
PATH=/tmp/bfubin /tmp/bfubin/bootadm \ |
|
4778 |
-m upgrade $bootadm_f_flag |
|
4779 |
else |
|
4780 |
PATH=/tmp/bfubin /tmp/bfubin/bootadm \ |
|
4781 |
-m upgrade -R $rootprefix \ |
|
4782 |
$bootadm_f_flag |
|
4783 |
fi |
|
4784 |
install_grub |
|
4785 |
[ $archive_type = directboot ] && update_bootenv |
|
4786 |
else |
|
4787 |
install_grub |
|
4788 |
cat >&2 <<EOF |
|
4789 |
||
4790 |
WARNING: Cannot find new bootadm. If bfu'ing across the multiboot/directboot |
|
4791 |
boundary, you will need to manually change menu.lst. See |
|
4792 |
http://www.sun.com/msg/SUNOS-8000-CF for details. |
|
4793 |
||
4794 |
EOF |
|
4795 |
fi |
|
4796 |
||
4797 |
# |
|
4798 |
# If we're going backwards, we need to remove the |
|
4799 |
# symdef binary. |
|
4800 |
# |
|
4801 |
if [ -f $rootprefix/boot/solaris/bin/symdef ] && \ |
|
4802 |
[ $archive_type = multiboot ] |
|
4803 |
then |
|
4804 |
rm -f $rootprefix/boot/solaris/bin/symdef \ |
|
4805 |
$rootprefix/boot/solaris/bin/update_grub |
|
4806 |
fi |
|
4807 |
elif [ $failsafe_type = multiboot ]; then |
|
4808 |
rm -f $rootprefix/boot/platform/i86pc/kernel/unix |
|
4809 |
fi |
|
4810 |
build_boot_archive |
|
4811 |
else |
|
4812 |
disable_boot_service |
|
4813 |
fi |
|
4814 |
} |
|
4815 |
||
0 | 4816 |
mondo_loop() { |
4817 |
typeset pkgroot |
|
4818 |
typeset pkg |
|
4819 |
root=$1 |
|
4820 |
zone=$2 |
|
1872 | 4821 |
if [ $zone != global ]; then |
4822 |
usrroot=$root |
|
4823 |
fi |
|
0 | 4824 |
|
4825 |
# If the archives being installed contain i86pc.boot, |
|
4826 |
# check to see if it contains strap.com, one of the |
|
4827 |
# four possibly-required booters. If i86pc.boot does, |
|
4828 |
# try to upgrade the realmode booters from the current |
|
4829 |
# archive set. |
|
4830 |
# |
|
4831 |
# Don't bother doing the upgrade for diskless bfu, as the boot |
|
4832 |
# will be done with floppy or PXE, which must match the build |
|
4833 |
# anyway (floppy must match or add_install_client must be |
|
4834 |
# rerun), and in any event we can't touch the boot bits |
|
4835 |
# for diskless boot from here. Also don't do this for |
|
4836 |
# any zone but 'global'. |
|
4837 |
||
4838 |
cd $root || fail "Cannot cd $root" |
|
4839 |
rootprefix=${root%/} |
|
4840 |
||
4841 |
if [ "$karch" = "i86pc" -a "$diskless" = "no" -a "$zone" = "global" ] |
|
4842 |
then |
|
4843 |
remove_properties |
|
3446 | 4844 |
check_system_type |
0 | 4845 |
if boot_is_upgradeable $root && \ |
3446 | 4846 |
[ $archive_type = dca ]; then |
0 | 4847 |
check_multi_to_dca_boot |
4848 |
print "\nUpdating realmode boot loaders\n" |
|
4849 |
update_realmode_booters $root |
|
4850 |
setup_pboot |
|
4851 |
fi |
|
3446 | 4852 |
if [ $multi_or_direct = yes ]; then |
0 | 4853 |
check_dca_to_multiboot |
4854 |
if [ $is_pcfs_boot = yes ]; then |
|
4855 |
setup_stubboot |
|
4856 |
fi |
|
4857 |
fi |
|
4858 |
fi |
|
4859 |
||
4860 |
SECONDS=0 # time each iteration |
|
4861 |
||
4862 |
print "\nSaving configuration files in $rootprefix/bfu.child ... \c" |
|
4863 |
cd $root |
|
4864 |
rm -rf bfu.default bfu.restore # historical |
|
4865 |
rm -rf bfu.child bfu.conflicts |
|
4866 |
mkdir bfu.child bfu.conflicts |
|
4867 |
filelist $zone | cpio -pdmu bfu.child || \ |
|
4868 |
fail 'failed to save config files' |
|
4869 |
test -f etc/motd && mv etc/motd etc/motd.old |
|
4870 |
||
4871 |
# |
|
4872 |
# If the var/sadm/system/admin/INST_RELEASE file still exists, |
|
4873 |
# this system has never been bfu'd before. Therefore, the |
|
4874 |
# information in var/sadm/install/contents is still valid and |
|
4875 |
# can be used to determine whether files have been modified |
|
4876 |
# since installation (the bfu.ancestors directory serves this |
|
4877 |
# purpose for systems that have already been bfu'd.) |
|
4878 |
# |
|
4879 |
if [ -f var/sadm/system/admin/INST_RELEASE ] ; then |
|
4880 |
firstbfu=yes |
|
4881 |
else |
|
4882 |
firstbfu=no |
|
4883 |
fi |
|
4884 |
||
4885 |
# |
|
4886 |
# bfu'ed systems are not upgradeable; prevent suninstall from |
|
4887 |
# even *presenting* the upgrade option by removing INST_RELEASE. |
|
4888 |
# |
|
4889 |
rm -f var/sadm/system/admin/INST_RELEASE |
|
4890 |
||
4891 |
# |
|
4892 |
# Hacks to work around minor annoyances and make life more pleasant. |
|
4893 |
# Part 1 of 2: pre-archive-extraction stuff |
|
4894 |
# |
|
4895 |
||
4896 |
# |
|
4897 |
# Do not remove remove_initd_links, since this makes sure things |
|
4898 |
# work properly when init scripts are shuffled around. |
|
4899 |
# |
|
4900 |
remove_initd_links |
|
4901 |
||
4902 |
# |
|
4903 |
# Remove rc.d scripts and things made superfluous by smf. |
|
4904 |
# Backwards BFUs will resurrect them from the archives. |
|
4905 |
# |
|
4906 |
smf_cleanup |
|
4907 |
||
4908 |
# |
|
4909 |
# New, enabled-by-default services need to be checked for, such |
|
4910 |
# that their enabled status is not flipped by BFU after their |
|
4911 |
# initial arrival. |
|
4912 |
# |
|
4913 |
smf_handle_new_services |
|
4914 |
||
2572 | 4915 |
# Reflect SUNWcsr's pre-install change, ensures |
4916 |
# the i.hosts action script works during 'acr' |
|
4917 |
if [[ -f $rootprefix/etc/inet/ipnodes && \ |
|
4918 |
! -h $rootprefix/etc/inet/ipnodes ]]; then |
|
4919 |
rm -f $rootprefix/etc/inet/ipnodes.hostsmerge |
|
4920 |
cp -p $rootprefix/etc/inet/ipnodes \ |
|
4921 |
$rootprefix/etc/inet/ipnodes.hostsmerge |
|
4922 |
fi |
|
4923 |
||
0 | 4924 |
# |
1545 | 4925 |
# Remove obsolete disassembler module |
4926 |
# |
|
4927 |
if [ $target_isa = sparc ]; then |
|
4928 |
rm -rf $usr/lib/mdb/disasm/* |
|
4929 |
rm -f $root/kernel/kmdb/sparcv9/sparc |
|
4930 |
fi |
|
4931 |
||
4932 |
# |
|
0 | 4933 |
# Remove obsolete Sun-Fire-880 (daktari) FMA Fault Tree directory |
4934 |
# and file. Backwards BFUs will resurrect them from the archives. |
|
4935 |
# |
|
4936 |
if [ $target_isa = sparc ]; then |
|
4937 |
rm -rf $usr/platform/SUNW,Sun-Fire-880/lib/fm |
|
4938 |
fi |
|
4939 |
||
4940 |
# |
|
3479 | 4941 |
# Remove old ndpd header (moved to /usr/include per 6509782) |
4942 |
# |
|
4943 |
rm -f $usr/include/protocols/ndpd.h |
|
4944 |
||
4945 |
# |
|
0 | 4946 |
# Remove old FMA dictionary files |
4947 |
# |
|
4948 |
rm -f $usr/lib/fm/FMD.dict |
|
4949 |
rm -f $usr/lib/fm/SUN4U.dict |
|
4950 |
rm -f $usr/lib/fm/SUNOS.dict |
|
4951 |
||
3323 | 4952 |
# Remove unused SMF dictionary |
4953 |
rm -f $root/usr/lib/fm/dict/SMF.dict |
|
4954 |
rm -f $root/usr/lib/locale/C/LC_MESSAGES/SMF.mo |
|
4955 |
||
0 | 4956 |
# |
4957 |
# Remove old FMA .eft files and directories |
|
4958 |
# |
|
4959 |
rm -f $usr/platform/sun4u/lib/fm/eft/pci-sun4u.eft |
|
4960 |
rm -rf $usr/platform/SUNW,Serverblade1/lib/fm |
|
4961 |
rm -rf $usr/platform/SUNW,Sun-Fire/lib/fm |
|
4962 |
rm -rf $usr/platform/SUNW,Sun-Fire-15000/lib/fm |
|
4963 |
||
4964 |
# |
|
2158
14f76022227f
6432948 build (etm.so) fails on machine running snv_28 or older
db35262
parents:
2130
diff
changeset
|
4965 |
# Remove old FMA LDOMS files |
14f76022227f
6432948 build (etm.so) fails on machine running snv_28 or older
db35262
parents:
2130
diff
changeset
|
4966 |
# |
14f76022227f
6432948 build (etm.so) fails on machine running snv_28 or older
db35262
parents:
2130
diff
changeset
|
4967 |
rm -f $usr/platform/sun4v/lib/fm/fmd/libldom.so.1 |
14f76022227f
6432948 build (etm.so) fails on machine running snv_28 or older
db35262
parents:
2130
diff
changeset
|
4968 |
rm -f $usr/platform/sun4v/lib/fm/fmd/libldom.so |
14f76022227f
6432948 build (etm.so) fails on machine running snv_28 or older
db35262
parents:
2130
diff
changeset
|
4969 |
rm -f $usr/platform/sun4v/lib/fm/fmd/llib-lldom |
14f76022227f
6432948 build (etm.so) fails on machine running snv_28 or older
db35262
parents:
2130
diff
changeset
|
4970 |
rm -f $usr/platform/sun4v/lib/fm/fmd/llib-lldom.ln |
14f76022227f
6432948 build (etm.so) fails on machine running snv_28 or older
db35262
parents:
2130
diff
changeset
|
4971 |
rm -f $usr/platform/sun4v/lib/fm/fmd/sparcv9/libldom.so.1 |
14f76022227f
6432948 build (etm.so) fails on machine running snv_28 or older
db35262
parents:
2130
diff
changeset
|
4972 |
rm -f $usr/platform/sun4v/lib/fm/fmd/sparcv9/libldom.so |
14f76022227f
6432948 build (etm.so) fails on machine running snv_28 or older
db35262
parents:
2130
diff
changeset
|
4973 |
rm -f $usr/platform/sun4v/lib/fm/fmd/sparcv9/llib-lldom.ln |
14f76022227f
6432948 build (etm.so) fails on machine running snv_28 or older
db35262
parents:
2130
diff
changeset
|
4974 |
|
14f76022227f
6432948 build (etm.so) fails on machine running snv_28 or older
db35262
parents:
2130
diff
changeset
|
4975 |
# |
1414
b4126407ac5b
PSARC 2006/020 FMA for Athlon 64 and Opteron Processors
cindi
parents:
1342
diff
changeset
|
4976 |
# Remove old topology data |
b4126407ac5b
PSARC 2006/020 FMA for Athlon 64 and Opteron Processors
cindi
parents:
1342
diff
changeset
|
4977 |
# |
b4126407ac5b
PSARC 2006/020 FMA for Athlon 64 and Opteron Processors
cindi
parents:
1342
diff
changeset
|
4978 |
rm -rf $usr/lib/fm/topo |
3062 | 4979 |
rm -f $usr/platform/*/lib/fm/topo/hc-topology.xml |
1414
b4126407ac5b
PSARC 2006/020 FMA for Athlon 64 and Opteron Processors
cindi
parents:
1342
diff
changeset
|
4980 |
|
b4126407ac5b
PSARC 2006/020 FMA for Athlon 64 and Opteron Processors
cindi
parents:
1342
diff
changeset
|
4981 |
# |
1541
1eda9cf84032
6390709 bfu should eradicate the now-obsolete fm/libtopo_enum.h
timh
parents:
1433
diff
changeset
|
4982 |
# Remove old prtopo and obsoleted include file. |
1eda9cf84032
6390709 bfu should eradicate the now-obsolete fm/libtopo_enum.h
timh
parents:
1433
diff
changeset
|
4983 |
# |
1eda9cf84032
6390709 bfu should eradicate the now-obsolete fm/libtopo_enum.h
timh
parents:
1433
diff
changeset
|
4984 |
rm -f $usr/include/fm/libtopo_enum.h |
1414
b4126407ac5b
PSARC 2006/020 FMA for Athlon 64 and Opteron Processors
cindi
parents:
1342
diff
changeset
|
4985 |
rm -f $usr/lib/fm/prtopo |
b4126407ac5b
PSARC 2006/020 FMA for Athlon 64 and Opteron Processors
cindi
parents:
1342
diff
changeset
|
4986 |
|
b4126407ac5b
PSARC 2006/020 FMA for Athlon 64 and Opteron Processors
cindi
parents:
1342
diff
changeset
|
4987 |
# |
0 | 4988 |
# Remove obsolete buildmnttab script. Backwards BFUs will |
4989 |
# resurrect it by extracting it from the archives. |
|
4990 |
# |
|
4991 |
rm -f $root/etc/init.d/buildmnttab |
|
4992 |
rm -f $root/etc/rcS.d/S70buildmnttab.sh |
|
4993 |
||
4994 |
# |
|
4995 |
# Break-up of inetsvc, inetinit & network -- remove both the old |
|
4996 |
# and new init scripts. The correct ones will be extracted from |
|
4997 |
# the archives whether bfu'ing backwards or forwards. |
|
4998 |
# |
|
4999 |
# old: need to remove going forwards: |
|
5000 |
# |
|
5001 |
rm -f $root/etc/rc0.d/K42inetsvc |
|
5002 |
rm -f $root/etc/rc1.d/K42inetsvc |
|
5003 |
rm -f $root/etc/rcS.d/K42inetsvc |
|
5004 |
rm -f $root/etc/rcS.d/S29network.sh |
|
5005 |
# |
|
5006 |
# new: need to remove going backwards: |
|
5007 |
# |
|
5008 |
rm -f $root/etc/init.d/domainname |
|
5009 |
rm -f $root/etc/init.d/inetd |
|
5010 |
rm -f $root/etc/init.d/named |
|
5011 |
rm -f $root/etc/init.d/nodename |
|
5012 |
rm -f $root/etc/rc0.d/K40inetd |
|
5013 |
rm -f $root/etc/rc0.d/K42named |
|
5014 |
rm -f $root/etc/rc1.d/K40inetd |
|
5015 |
rm -f $root/etc/rc1.d/K42named |
|
5016 |
rm -f $root/etc/rc2.d/S69domainname |
|
5017 |
rm -f $root/etc/rc2.d/S72named |
|
5018 |
rm -f $root/etc/rc2.d/S77inetd |
|
5019 |
rm -f $root/etc/rcS.d/K40inetd |
|
5020 |
rm -f $root/etc/rcS.d/K42named |
|
5021 |
rm -f $root/etc/rcS.d/S28network.sh |
|
5022 |
rm -f $root/etc/rcS.d/S29nodename.sh |
|
5023 |
||
5024 |
# |
|
5025 |
# Remove Zones init scripts: they will be extracted properly |
|
5026 |
# going forwards; after going backwards, they will be gone, |
|
5027 |
# thus preventing scary warnings on subsequent bfu's. |
|
5028 |
# |
|
5029 |
rm -f $root/etc/init.d/zones |
|
5030 |
rm -f $root/etc/rc0.d/K01zones |
|
5031 |
rm -f $root/etc/rc1.d/K01zones |
|
5032 |
rm -f $root/etc/rc2.d/K01zones |
|
5033 |
rm -f $root/etc/rc3.d/S99zones |
|
5034 |
rm -f $root/etc/rcS.d/K01zones |
|
5035 |
||
5036 |
# |
|
5037 |
# Remove <inet>6 STREAMS modules; these no longer exist (and |
|
5038 |
# should never have existed in the first place). |
|
5039 |
# |
|
5040 |
rm -f $root/kernel/strmod/icmp6 \ |
|
5041 |
$root/kernel/strmod/ip6 \ |
|
5042 |
$root/kernel/strmod/tcp6 \ |
|
5043 |
$root/kernel/strmod/udp6 \ |
|
5044 |
||
5045 |
rm -f $root/kernel/strmod/sparcv9/icmp6 \ |
|
5046 |
$root/kernel/strmod/sparcv9/ip6 \ |
|
5047 |
$root/kernel/strmod/sparcv9/tcp6 \ |
|
5048 |
$root/kernel/strmod/sparcv9/udp6 \ |
|
5049 |
||
5050 |
# |
|
789 | 5051 |
# Remove old ZFS binaries (back when it was three modules) |
5052 |
# |
|
1872 | 5053 |
find $root/kernel/drv -name zpool 2> /dev/null | xargs rm -f |
789 | 5054 |
rm -f $root/kernel/drv/zpool.conf |
790 | 5055 |
rm -f $root/kernel/drv/zpool.cache |
789 | 5056 |
|
1872 | 5057 |
find $root/kernel/drv -name zvol 2> /dev/null | xargs rm -f |
789 | 5058 |
rm -f $root/kernel/drv/zvol.conf |
5059 |
||
5060 |
# |
|
0 | 5061 |
# Remove /usr/lib/old_libthread since support for it has |
5062 |
# been removed from the kernel in Solaris 10. If this is |
|
5063 |
# a backwards BFU, it will all be extracted again by cpio. |
|
5064 |
rm -rf $usr/lib/old_libthread |
|
5065 |
||
5066 |
# Remove libconfig |
|
5067 |
rm -f $usr/lib/drv/config_md.so.1 |
|
5068 |
rm -f $usr/include/config_md.h |
|
5069 |
# remove libssd |
|
5070 |
rm -f $usr/lib/libssd.a |
|
5071 |
rm -f $usr/lib/libssd.so |
|
5072 |
rm -f $usr/lib/libssd.so.1 |
|
5073 |
# remove libap |
|
5074 |
rm -f $usr/lib/libap_dmd.a |
|
5075 |
rm -f $usr/lib/libap_dmd.so.1 |
|
5076 |
# remove libintpos |
|
5077 |
rm -f $usr/lib/libintpos.a |
|
5078 |
rm -f $usr/lib/libintpos.so.1 |
|
5079 |
||
5080 |
# Remove obsolete abi subdirectories |
|
5081 |
if [ -d $usr/platform/*/lib/abi ]; then |
|
5082 |
rm -rf $usr/platform/*/lib/abi |
|
5083 |
fi |
|
5084 |
rm -rf $usr/lib/gss/abi |
|
5085 |
rm -rf $usr/lib/krb5/abi |
|
5086 |
rm -rf $usr/xpg4/lib/abi |
|
5087 |
rm -rf $usr/ucblib/abi |
|
5088 |
||
5089 |
# |
|
5090 |
# Remove old stuff related to libthread now that libthread has |
|
5091 |
# been folded into libc and libthread_db has been renamed libc_db. |
|
2545
ee1af4187b80
6459290 cleanup after 6357230 (specfiles should be nuked)
raf
parents:
2479
diff
changeset
|
5092 |
# In addition, all the apptrace's tracing libraries (i.e., abi_*.so*), |
ee1af4187b80
6459290 cleanup after 6357230 (specfiles should be nuked)
raf
parents:
2479
diff
changeset
|
5093 |
# spec2map and spec2trace are no longer needed, should be removed. |
0 | 5094 |
rm -f \ |
2545
ee1af4187b80
6459290 cleanup after 6357230 (specfiles should be nuked)
raf
parents:
2479
diff
changeset
|
5095 |
$usr/lib/mdb/proc/libthread.so \ |
ee1af4187b80
6459290 cleanup after 6357230 (specfiles should be nuked)
raf
parents:
2479
diff
changeset
|
5096 |
$usr/lib/mdb/proc/sparcv9/libthread.so \ |
ee1af4187b80
6459290 cleanup after 6357230 (specfiles should be nuked)
raf
parents:
2479
diff
changeset
|
5097 |
$usr/lib/abi/spec2map \ |
ee1af4187b80
6459290 cleanup after 6357230 (specfiles should be nuked)
raf
parents:
2479
diff
changeset
|
5098 |
$usr/lib/abi/spec2trace \ |
ee1af4187b80
6459290 cleanup after 6357230 (specfiles should be nuked)
raf
parents:
2479
diff
changeset
|
5099 |
$usr/lib/abi/abi_*.so* \ |
0 | 5100 |
$usr/lib/abi/sparcv9/abi_*.so* |
5101 |
||
5102 |
# |
|
5103 |
# Remove the old symlink /lib => usr/lib, if necessary. |
|
5104 |
# /lib is now a real directory in the root filesystem. |
|
5105 |
# Remove all of the old static libraries and commands now |
|
5106 |
# that we no longer build them. If this is a backwards |
|
5107 |
# BFU, all this will all be extracted again by cpio. |
|
5108 |
rm $root/lib 2>/dev/null |
|
5109 |
rm -rf $usr/lib/pics |
|
5110 |
rm -rf $usr/sbin/static |
|
5111 |
rm -f \ |
|
5112 |
$usr/ccs/lib/libcurses.a \ |
|
5113 |
$usr/ccs/lib/libform.a \ |
|
5114 |
$usr/ccs/lib/libgen.a \ |
|
5115 |
$usr/ccs/lib/libl.a \ |
|
5116 |
$usr/ccs/lib/libmalloc.a \ |
|
5117 |
$usr/ccs/lib/libmenu.a \ |
|
5118 |
$usr/ccs/lib/libpanel.a \ |
|
5119 |
$usr/ccs/lib/libtermcap.a \ |
|
5120 |
$usr/ccs/lib/libtermlib.a \ |
|
5121 |
$usr/ccs/lib/liby.a \ |
|
5122 |
$usr/lib/lib300.a \ |
|
5123 |
$usr/lib/lib300s.a \ |
|
5124 |
$usr/lib/lib4014.a \ |
|
5125 |
$usr/lib/lib450.a \ |
|
5126 |
$usr/lib/libTL.a \ |
|
5127 |
$usr/lib/libadm.a \ |
|
5128 |
$usr/lib/libadt_jni.a \ |
|
5129 |
$usr/lib/libbsdmalloc.a \ |
|
5130 |
$usr/lib/libbsm.a \ |
|
5131 |
$usr/lib/libc.a \ |
|
5132 |
$usr/lib/libc2.a \ |
|
5133 |
$usr/lib/libc2stubs.a \ |
|
5134 |
$usr/lib/libcmd.a \ |
|
5135 |
$usr/lib/libcrypt.a \ |
|
5136 |
$usr/lib/libcrypt_d.a \ |
|
5137 |
$usr/lib/libcrypt_i.a \ |
|
5138 |
$usr/lib/libcurses.a \ |
|
5139 |
$usr/lib/libdevid.a \ |
|
5140 |
$usr/lib/libdevinfo.a \ |
|
5141 |
$usr/lib/libdhcpagent.a \ |
|
5142 |
$usr/lib/libdhcputil.a \ |
|
5143 |
$usr/lib/libdl_stubs.a \ |
|
5144 |
$usr/lib/libefi.a \ |
|
5145 |
$usr/lib/libelf.a \ |
|
5146 |
$usr/lib/libform.a \ |
|
5147 |
$usr/lib/libgen.a \ |
|
5148 |
$usr/lib/libgenIO.a \ |
|
5149 |
$usr/lib/libike.a \ |
|
5150 |
$usr/lib/libinetcfg.a \ |
|
5151 |
$usr/lib/libinetutil.a \ |
|
5152 |
$usr/lib/libintl.a \ |
|
5153 |
$usr/lib/libkstat.a \ |
|
5154 |
$usr/lib/libl.a \ |
|
5155 |
$usr/lib/libldfeature.a \ |
|
5156 |
$usr/lib/libmail.a \ |
|
5157 |
$usr/lib/libmalloc.a \ |
|
5158 |
$usr/lib/libmapmalloc.a \ |
|
5159 |
$usr/lib/libmenu.a \ |
|
5160 |
$usr/lib/libmeta.a \ |
|
5161 |
$usr/lib/libmp.a \ |
|
5162 |
$usr/lib/libnisdb.a \ |
|
5163 |
$usr/lib/libnls.a \ |
|
5164 |
$usr/lib/libnsl.a \ |
|
5165 |
$usr/lib/libnss_compat.a \ |
|
5166 |
$usr/lib/libnss_dns.a \ |
|
5167 |
$usr/lib/libnss_files.a \ |
|
5168 |
$usr/lib/libnss_nis.a \ |
|
5169 |
$usr/lib/libnss_nisplus.a \ |
|
5170 |
$usr/lib/libp/libc.a \ |
|
5171 |
$usr/lib/libpam.a \ |
|
5172 |
$usr/lib/libpanel.a \ |
|
5173 |
$usr/lib/libplot.a \ |
|
5174 |
$usr/lib/librac.a \ |
|
5175 |
$usr/lib/libresolv.a \ |
|
5176 |
$usr/lib/librpcsvc.a \ |
|
5177 |
$usr/lib/libsec.a \ |
|
5178 |
$usr/lib/libsendfile.a \ |
|
5179 |
$usr/lib/libsocket.a \ |
|
5180 |
$usr/lib/libstraddr.a \ |
|
5181 |
$usr/lib/libtermcap.a \ |
|
5182 |
$usr/lib/libtermlib.a \ |
|
5183 |
$usr/lib/libuuid.a \ |
|
5184 |
$usr/lib/libvolmgt.a \ |
|
5185 |
$usr/lib/libvt0.a \ |
|
5186 |
$usr/lib/libw.a \ |
|
5187 |
$usr/lib/liby.a \ |
|
5188 |
$usr/lib/null.a \ |
|
5189 |
$usr/lib/sparcv9/libadt_jni.a \ |
|
5190 |
$usr/lib/sparcv9/libinetutil.a \ |
|
5191 |
$usr/lib/sparcv9/libldfeature.a \ |
|
5192 |
$usr/lib/sparcv9/libsendfile.a \ |
|
5193 |
$usr/platform/sun4u/lib/libwrsmconf.a \ |
|
5194 |
$usr/ucblib/libcurses.a \ |
|
5195 |
$usr/ucblib/libdbm.a \ |
|
5196 |
$usr/ucblib/libtermcap.a \ |
|
5197 |
$usr/ucblib/libucb.a |
|
5198 |
||
5199 |
# |
|
5200 |
# Remove other obsolete files, too |
|
5201 |
rm -f \ |
|
5202 |
$usr/include/table.h \ |
|
5203 |
$usr/include/libgenIO.h \ |
|
5204 |
$usr/lib/llib-lTL \ |
|
5205 |
$usr/lib/llib-lTL.ln |
|
5206 |
||
5207 |
# |
|
5208 |
# libc_psr.so.1 and libmd5_psr.so.1 have been moved |
|
5209 |
# from /usr/platform/*/lib to /platform/*/lib. |
|
5210 |
# Remove the old files and their containing directories |
|
5211 |
rm -f $usr/platform/*/lib/libc_psr.so.1 |
|
5212 |
rm -f $usr/platform/*/lib/sparcv9/libc_psr.so.1 |
|
5213 |
rm -f $usr/platform/*/lib/libmd5_psr.so.1 |
|
5214 |
rm -f $usr/platform/*/lib/sparcv9/libmd5_psr.so.1 |
|
5215 |
rmdir $usr/platform/*/lib/sparcv9 2>/dev/null |
|
5216 |
rmdir $usr/platform/*/lib 2>/dev/null |
|
5217 |
||
5218 |
# |
|
5219 |
# Remove obsolete profile libc symlinks |
|
5220 |
rm -f $usr/lib/libp/libc.so |
|
5221 |
rm -f $usr/lib/libp/sparcv9/libc.so |
|
5222 |
||
5223 |
# |
|
5224 |
# Remove Legacy DR files, now obsolete due to NGDR Phase II putback |
|
5225 |
# |
|
5226 |
STARFIRE_PLAT=platform/SUNW,Ultra-Enterprise-10000 |
|
5227 |
rm -f \ |
|
5228 |
$root/$STARFIRE_PLAT/kernel/drv/dr \ |
|
5229 |
$root/$STARFIRE_PLAT/kernel/drv/dr.conf \ |
|
5230 |
$root/$STARFIRE_PLAT/kernel/misc/drmach \ |
|
5231 |
$root/$STARFIRE_PLAT/kernel/drv/sparcv9/dr \ |
|
5232 |
$root/$STARFIRE_PLAT/kernel/misc/sparcv9/drmach \ |
|
5233 |
$root/$STARFIRE_PLAT/lib/dr_daemon \ |
|
5234 |
$usr/platform/sun4u/include/sys/dr.h \ |
|
5235 |
$usr/platform/sun4u/include/sys/sfdr.h |
|
5236 |
||
2117
fd716e844862
6406742 need to remove SUNW,OPL-Enterprise platform links
mcwalter
parents:
2015
diff
changeset
|
5237 |
# Remove obsolete OPL platform links. |
fd716e844862
6406742 need to remove SUNW,OPL-Enterprise platform links
mcwalter
parents:
2015
diff
changeset
|
5238 |
rm -f $root/platform/FJSV,SPARC-Enterprise |
fd716e844862
6406742 need to remove SUNW,OPL-Enterprise platform links
mcwalter
parents:
2015
diff
changeset
|
5239 |
rm -f $root/platform/SUNW,OPL-Enterprise |
fd716e844862
6406742 need to remove SUNW,OPL-Enterprise platform links
mcwalter
parents:
2015
diff
changeset
|
5240 |
rm -f $usr/platform/FJSV,SPARC-Enterprise |
fd716e844862
6406742 need to remove SUNW,OPL-Enterprise platform links
mcwalter
parents:
2015
diff
changeset
|
5241 |
rm -f $usr/platform/SUNW,OPL-Enterprise |
fd716e844862
6406742 need to remove SUNW,OPL-Enterprise platform links
mcwalter
parents:
2015
diff
changeset
|
5242 |
|
0 | 5243 |
# Solstice Enterprise Agent(SEA) : mib-II subagent mibiisa |
5244 |
# needs to be disabled during startup. SMA(System Management Agent) |
|
5245 |
# has the capability to support mib-II requests. |
|
5246 |
# The correct ones will be extracted from |
|
5247 |
# the archives whether bfu'ing backwards or forwards. |
|
5248 |
# |
|
5249 |
# old: need to remove going forwards: |
|
5250 |
rm -f $root/etc/snmp/conf/mibiisa.rsrc |
|
5251 |
# |
|
5252 |
# new: need to remove going backwards: |
|
5253 |
rm -f $root/etc/snmp/conf/mibiisa.rsrc- |
|
5254 |
||
1253 | 5255 |
# remove old terminal emulator module: |
5256 |
# (renamed from 'terminal-emulator' to 'tem') |
|
5257 |
# |
|
5258 |
# old: need to remove going forwards: |
|
5259 |
rm -f $root/kernel/misc/terminal-emulator |
|
5260 |
rm -f $root/kernel/misc/amd64/terminal-emulator |
|
5261 |
# |
|
5262 |
# new: need to remove going backwards: |
|
5263 |
rm -f $root/kernel/misc/tem |
|
5264 |
rm -f $root/kernel/misc/amd64/tem |
|
5265 |
rm -f $root/kernel/misc/sparcv9/tem |
|
5266 |
||
0 | 5267 |
# |
5268 |
# Remove /dev/mc symlink and /platform/sun4u/kernel/drv/mc-us3.conf |
|
5269 |
# if any. |
|
5270 |
# |
|
5271 |
if [ -h $root/dev/mc ]; then |
|
5272 |
rm -f $root/dev/mc |
|
5273 |
fi |
|
5274 |
||
5275 |
if [ -f $root/platform/sun4u/kernel/drv/mc-us3.conf ]; then |
|
5276 |
rm -f $root/platform/sun4u/kernel/drv/mc-us3.conf |
|
5277 |
fi |
|
5278 |
||
5279 |
# |
|
5280 |
# Remove the snowbird sbin and include symlinks |
|
5281 |
# |
|
5282 |
||
5283 |
if [[ -h $usr/platform/SUNW,Netra-CP2300/sbin ]] ; then |
|
5284 |
rm -f $usr/platform/SUNW,Netra-CP2300/sbin |
|
5285 |
fi |
|
5286 |
||
5287 |
if [[ -h $usr/platform/SUNW,Netra-CP2300/include ]] ; then |
|
5288 |
rm -f $usr/platform/SUNW,Netra-CP2300/include |
|
5289 |
fi |
|
5290 |
||
5291 |
# If we still have the old lp(7D) driver, remove it and its symlinks |
|
5292 |
# and header file. (If driver already gone, don't trample new symlinks.) |
|
5293 |
# |
|
5294 |
if [ -f $root/platform/i86pc/kernel/drv/lp -a \ |
|
5295 |
-h $root/dev/lp[012] ]; then |
|
5296 |
rm -f $root/dev/lp[012] |
|
5297 |
fi |
|
5298 |
rm -f $root/platform/i86pc/kernel/drv/lp.conf |
|
5299 |
rm -f $root/platform/i86pc/kernel/drv/lp |
|
5300 |
rm -f $root/usr/include/sys/lp.h |
|
5301 |
||
5302 |
# |
|
5303 |
# Remove V880 CPU DR files, program cancelled |
|
5304 |
# |
|
5305 |
DAKTARI_PLAT=platform/SUNW,Sun-Fire-880 |
|
5306 |
rm -f \ |
|
5307 |
$root/$DAKTARI_PLAT/kernel/drv/gptwo.conf \ |
|
5308 |
$root/$DAKTARI_PLAT/kernel/drv/sparcv9/bbc \ |
|
5309 |
$root/$DAKTARI_PLAT/kernel/drv/sparcv9/gptwo \ |
|
5310 |
$root/$DAKTARI_PLAT/kernel/misc/sparcv9/sbdp \ |
|
5311 |
$usr/platform/sun4u/include/sys/sbdp.h |
|
5312 |
||
5313 |
# |
|
5314 |
# Remove crash(1M), now obsoleted by mdb(1). If this is a backwards |
|
5315 |
# BFU, it will be extracted again by cpio. |
|
5316 |
# |
|
5317 |
rm -f $root/etc/crash $usr/sbin/crash $usr/sbin/i86/crash \ |
|
5318 |
$usr/sbin/sparcv7/crash $usr/sbin/sparcv9/crash |
|
5319 |
||
5320 |
# |
|
5321 |
# Remove kadb(1M), now obsoleted by kmdb(1M) |
|
5322 |
# |
|
5323 |
rm -f $root/platform/*/kadb |
|
5324 |
||
5325 |
# |
|
5326 |
# Remove old platform dmod symlinks |
|
5327 |
# |
|
5328 |
for dir in $usr/platform/*/lib/mdb ; do |
|
5329 |
[[ -h $dir ]] && rm -f $dir |
|
5330 |
done |
|
5331 |
||
5332 |
# |
|
5333 |
# Remove ADB macros |
|
5334 |
# |
|
5335 |
rm -fr $usr/lib/adb |
|
5336 |
||
5337 |
for dir in $usr/platform/*/lib/adb ; do |
|
5338 |
rm -fr $dir |
|
5339 |
done |
|
5340 |
||
5341 |
# |
|
5342 |
# Remove the SGENV driver from the Sun-Fire directory structure. |
|
5343 |
# If this is a backwards BFU, it will be extracted again by cpio. |
|
5344 |
# |
|
5345 |
SERENGETI_PLAT=platform/SUNW,Sun-Fire |
|
5346 |
rm -f $root/$SERENGETI_PLAT/kernel/drv/sgenv.conf \ |
|
5347 |
$root/$SERENGETI_PLAT/kernel/drv/sparcv9/sgenv |
|
5348 |
||
5349 |
# |
|
5350 |
# Remove sun4m |
|
5351 |
# |
|
5352 |
rm -rf $root/platform/sun4m |
|
5353 |
rm -rf $usr/platform/sun4m |
|
5354 |
if [ $target_isa = sparc ]; then |
|
5355 |
rm -f $root/kernel/genunix |
|
5356 |
fi |
|
5357 |
rm -f $root/kernel/drv/xbox |
|
5358 |
rm -f $usr/include/sys/comvec.h |
|
5359 |
rm -f $usr/include/sys/openprom.h |
|
5360 |
rm -f $usr/include/sys/cg14io.h |
|
5361 |
rm -f $usr/include/sys/cg14reg.h |
|
5362 |
rm -f $usr/include/sys/cg8reg.h |
|
5363 |
rm -f $usr/include/sys/cg8var.h |
|
5364 |
||
5365 |
# |
|
5366 |
# Remove perl 5.005_03. If this is a backwards bfu, |
|
5367 |
# it will be extracted again by cpio. |
|
5368 |
# |
|
5369 |
if [[ -d $usr/perl5/5.00503 ]]; then |
|
5370 |
remove_perl_500503 |
|
5371 |
fi |
|
5372 |
||
5373 |
# |
|
5374 |
# Remove perl 5.8.3, but only if the generic.usr archive contains 5.8.4. |
|
5375 |
# If this is a backwards bfu, 5.8.3 will be extracted again by cpio. |
|
5376 |
# |
|
5377 |
if [[ -d $usr/perl5/5.8.3 ]] && $ZCAT $cpiodir/generic.usr$ZFIX | \ |
|
5378 |
cpio -it 2>/dev/null | egrep -s '^usr/perl5/5.8.4/'; then |
|
5379 |
remove_perl_583 |
|
5380 |
fi |
|
5381 |
||
5382 |
# |
|
5383 |
# Clean up legacy versions of the FMA CPU/Mem DE which may be still |
|
5384 |
# be laying around. This check may be removed when a sufficient time |
|
5385 |
# has lapsed between the FMA putback as to ensure that no test machines |
|
5386 |
# still have development FMA bits. |
|
5387 |
# |
|
5388 |
for platdir in $usr/platform/SUNW,* ; do |
|
5389 |
[[ -h $platdir ]] && continue |
|
5390 |
||
5391 |
rm -f $platdir/lib/fm/fmd/plugins/cpumem-diagnosis.so |
|
5392 |
rm -f $platdir/lib/fm/fmd/plugins/cpumem-diagnosis.conf |
|
5393 |
done |
|
5394 |
||
5395 |
# Remove pam_unix |
|
5396 |
# |
|
5397 |
rm -f $usr/lib/security/pam_unix.so.1 |
|
5398 |
rm -f $usr/lib/security/pam_unix.so |
|
5399 |
rm -f $usr/lib/security/sparcv9/pam_unix.so.1 |
|
5400 |
rm -f $usr/lib/security/sparcv9/pam_unix.so |
|
5401 |
||
5402 |
# |
|
5403 |
# Remove libldap.so.3 |
|
5404 |
# |
|
5405 |
rm -f $usr/lib/libldap.so.3 |
|
5406 |
rm -f $usr/lib/sparcv9/libldap.so.3 |
|
5407 |
||
5408 |
# |
|
5409 |
# Remove nss XFN support no longer used by printing |
|
5410 |
# |
|
5411 |
sed -e '/printers:/s/xfn[ ]*//' \ |
|
5412 |
$rootprefix/bfu.child/etc/nsswitch.conf > /tmp/nssw.$$ |
|
5413 |
cp /tmp/nssw.$$ $rootprefix/bfu.child/etc/nsswitch.conf |
|
5414 |
rm -f /tmp/nssw.$$ |
|
5415 |
rm -f $usr/lib/nss_xfn.so.1 |
|
5416 |
rm -f $usr/lib/sparcv9/nss_xfn.so.1 |
|
5417 |
||
5418 |
# |
|
5419 |
# Remove FNS/XFN. |
|
5420 |
# |
|
5421 |
if [ -d $rootprefix/etc/fn -o \ |
|
5422 |
-d $usr/include/xfn -o \ |
|
5423 |
-d $usr/lib/fn -o \ |
|
5424 |
-d $rootprefix/var/fn ]; then |
|
5425 |
remove_eof_fns |
|
5426 |
fi |
|
5427 |
||
5428 |
# |
|
765 | 5429 |
# Remove AT&T FACE |
5430 |
# |
|
5431 |
if [ -d $usr/oasys -o -d $usr/vmsys ]; then |
|
5432 |
remove_eof_face |
|
5433 |
fi |
|
5434 |
||
5435 |
# |
|
1706 | 5436 |
# Remove DMI |
5437 |
# |
|
5438 |
if [ -d $usr/lib/dmi -o \ |
|
5439 |
-d $rootprefix/etc/dmi -o \ |
|
5440 |
-d $rootprefix/var/dmi ]; then |
|
5441 |
remove_eof_dmi |
|
5442 |
fi |
|
5443 |
||
5444 |
# |
|
1433 | 5445 |
# Remove ASET |
5446 |
# |
|
5447 |
if [ -d $usr/aset ]; then |
|
5448 |
remove_eof_aset |
|
5449 |
fi |
|
5450 |
||
5451 |
# |
|
0 | 5452 |
# Remove BIND 8, but only if the generic.usr archive doesn't contains |
5453 |
# BIND 8 named server/tools. If this is a backwards bfu, BIND 8 will |
|
5454 |
# be extracted again by cpio. |
|
5455 |
# |
|
5456 |
if [[ -f $usr/sbin/dnskeygen ]] && ! $ZCAT $cpiodir/generic.usr$ZFIX \ |
|
5457 |
| cpio -it 2>/dev/null | egrep -s '^usr/sbin/ndc' ; then |
|
5458 |
remove_eof_bind8 |
|
5459 |
fi |
|
5460 |
||
5461 |
# |
|
5462 |
# Remove any sendmailvars: line from /etc/nsswitch.conf |
|
5463 |
# |
|
5464 |
sed -e '/^sendmailvars:/d' $rootprefix/bfu.child/etc/nsswitch.conf > \ |
|
5465 |
/tmp/nssw.$$ |
|
5466 |
cp /tmp/nssw.$$ $rootprefix/bfu.child/etc/nsswitch.conf |
|
5467 |
rm -f /tmp/nssw.$$ |
|
5468 |
||
5469 |
# |
|
2912
85ea316d9c18
PSARC 2005/399 Tamarack: Removable Media Enhancements in Solaris
artem
parents:
2866
diff
changeset
|
5470 |
# Remove vold |
85ea316d9c18
PSARC 2005/399 Tamarack: Removable Media Enhancements in Solaris
artem
parents:
2866
diff
changeset
|
5471 |
# |
85ea316d9c18
PSARC 2005/399 Tamarack: Removable Media Enhancements in Solaris
artem
parents:
2866
diff
changeset
|
5472 |
if [ -f $rootprefix/etc/vold.conf -o -d $usr/lib/vold ]; then |
85ea316d9c18
PSARC 2005/399 Tamarack: Removable Media Enhancements in Solaris
artem
parents:
2866
diff
changeset
|
5473 |
remove_eof_vold |
85ea316d9c18
PSARC 2005/399 Tamarack: Removable Media Enhancements in Solaris
artem
parents:
2866
diff
changeset
|
5474 |
fi |
85ea316d9c18
PSARC 2005/399 Tamarack: Removable Media Enhancements in Solaris
artem
parents:
2866
diff
changeset
|
5475 |
|
85ea316d9c18
PSARC 2005/399 Tamarack: Removable Media Enhancements in Solaris
artem
parents:
2866
diff
changeset
|
5476 |
# |
0 | 5477 |
# Remove SUNWcoff package |
5478 |
# |
|
5479 |
pkgroot=${rootprefix:+-R $rootprefix} |
|
5480 |
pkg=SUNWcoff |
|
5481 |
if [ $target_isa = i386 ]; then |
|
5482 |
if pkginfo $pkgroot -q $pkg; then |
|
5483 |
pkgrm $pkgroot -n $pkg >/dev/null 2>&1 |
|
5484 |
fi |
|
5485 |
||
5486 |
# In case that did not work, do it manually. |
|
5487 |
if [ -d $rootprefix/var/sadm/pkg/$pkg ]; then |
|
5488 |
rm -rf $rootprefix/var/sadm/pkg/$pkg |
|
5489 |
rm $rootprefix/kernel/exec/coffexec |
|
5490 |
fi |
|
5491 |
fi |
|
5492 |
||
5493 |
# |
|
5494 |
# Remove GMT* zoneinfo files |
|
5495 |
# |
|
5496 |
rm -f $usr/share/lib/zoneinfo/GMT-12 |
|
5497 |
rm -f $usr/share/lib/zoneinfo/GMT-11 |
|
5498 |
rm -f $usr/share/lib/zoneinfo/GMT-10 |
|
5499 |
rm -f $usr/share/lib/zoneinfo/GMT-9 |
|
5500 |
rm -f $usr/share/lib/zoneinfo/GMT-8 |
|
5501 |
rm -f $usr/share/lib/zoneinfo/GMT-7 |
|
5502 |
rm -f $usr/share/lib/zoneinfo/GMT-6 |
|
5503 |
rm -f $usr/share/lib/zoneinfo/GMT-5 |
|
5504 |
rm -f $usr/share/lib/zoneinfo/GMT-4 |
|
5505 |
rm -f $usr/share/lib/zoneinfo/GMT-3 |
|
5506 |
rm -f $usr/share/lib/zoneinfo/GMT-2 |
|
5507 |
rm -f $usr/share/lib/zoneinfo/GMT-1 |
|
5508 |
rm -f $usr/share/lib/zoneinfo/GMT+1 |
|
5509 |
rm -f $usr/share/lib/zoneinfo/GMT+2 |
|
5510 |
rm -f $usr/share/lib/zoneinfo/GMT+3 |
|
5511 |
rm -f $usr/share/lib/zoneinfo/GMT+4 |
|
5512 |
rm -f $usr/share/lib/zoneinfo/GMT+5 |
|
5513 |
rm -f $usr/share/lib/zoneinfo/GMT+6 |
|
5514 |
rm -f $usr/share/lib/zoneinfo/GMT+7 |
|
5515 |
rm -f $usr/share/lib/zoneinfo/GMT+8 |
|
5516 |
rm -f $usr/share/lib/zoneinfo/GMT+9 |
|
5517 |
rm -f $usr/share/lib/zoneinfo/GMT+10 |
|
5518 |
rm -f $usr/share/lib/zoneinfo/GMT+11 |
|
5519 |
rm -f $usr/share/lib/zoneinfo/GMT+12 |
|
5520 |
rm -f $usr/share/lib/zoneinfo/GMT+13 |
|
5521 |
||
5522 |
# Remove stc(7d)-related files |
|
5523 |
rm -f $usr/include/sys/stcio.h |
|
5524 |
rm -f $usr/include/sys/stcvar.h |
|
5525 |
rm -f $usr/include/sys/stcreg.h |
|
5526 |
rm -f $usr/include/sys/stcconf.h |
|
5527 |
SUN4U_DRV=platform/sun4u/kernel/drv |
|
5528 |
rm -f $rootprefix/$SUN4U_DRV/stc.conf |
|
5529 |
rm -f $rootprefix/$SUN4U_DRV/stc |
|
5530 |
rm -f $rootprefix/$SUN4U_DRV/sparcv9/stc |
|
5531 |
||
5532 |
# Remove old CPC adb macros. |
|
5533 |
rm -f $usr/lib/adb/cpc_ctx |
|
5534 |
rm -f $usr/lib/adb/cpc_event |
|
5535 |
if [ $target_isa = sparc ]; then |
|
5536 |
rm -f $usr/lib/adb/sparcv9/cpc_ctx |
|
5537 |
rm -f $usr/lib/adb/sparcv9/cpc_event |
|
5538 |
fi; |
|
5539 |
||
5540 |
# Remove obsolete DTrace demos |
|
5541 |
rm -f $usr/demo/dtrace/cputick.d |
|
5542 |
||
5543 |
# Remove flashprom-related files. |
|
5544 |
if [ $target_isa = sparc ]; then |
|
5545 |
for x in $FLASHPROMLIST |
|
5546 |
do |
|
5547 |
rm -f $root/$x; |
|
5548 |
done |
|
5549 |
fi; |
|
5550 |
||
2621 | 5551 |
# Remove pt_chmod - obsoleted by new /dev filesystem |
5552 |
if [ $zone = global ]; then |
|
5553 |
rm -f $usr/lib/pt_chmod |
|
5554 |
fi |
|
5555 |
||
0 | 5556 |
if [ $RM_32BIT_KERNEL -eq 1 -a $zone = global ]; |
5557 |
then |
|
5558 |
print "Removing 32-bit commands and kernel binaries ... \c"; |
|
5559 |
rm -rf \ |
|
5560 |
$usr/bin/sparcv7/amt \ |
|
5561 |
$usr/bin/sparcv7/cputrack \ |
|
5562 |
$usr/bin/sparcv7/newtask \ |
|
5563 |
$usr/bin/sparcv7/nohup \ |
|
5564 |
$usr/bin/sparcv7/pargs \ |
|
5565 |
$usr/bin/sparcv7/pcred \ |
|
5566 |
$usr/bin/sparcv7/pfiles \ |
|
5567 |
$usr/bin/sparcv7/pflags \ |
|
5568 |
$usr/bin/sparcv7/pldd \ |
|
5569 |
$usr/bin/sparcv7/plimit \ |
|
5570 |
$usr/bin/sparcv7/pmap \ |
|
5571 |
$usr/bin/sparcv7/ppgsz \ |
|
5572 |
$usr/bin/sparcv7/ppriv \ |
|
5573 |
$usr/bin/sparcv7/prctl \ |
|
5574 |
$usr/bin/sparcv7/preap \ |
|
5575 |
$usr/bin/sparcv7/prex \ |
|
5576 |
$usr/bin/sparcv7/prstat \ |
|
5577 |
$usr/bin/sparcv7/prun \ |
|
5578 |
$usr/bin/sparcv7/ps \ |
|
5579 |
$usr/bin/sparcv7/psig \ |
|
5580 |
$usr/bin/sparcv7/pstack \ |
|
5581 |
$usr/bin/sparcv7/pstop \ |
|
5582 |
$usr/bin/sparcv7/ptime \ |
|
5583 |
$usr/bin/sparcv7/ptree \ |
|
5584 |
$usr/bin/sparcv7/pwait \ |
|
5585 |
$usr/bin/sparcv7/pwdx \ |
|
5586 |
$usr/bin/sparcv7/setuname \ |
|
5587 |
$usr/bin/sparcv7/sort \ |
|
5588 |
$usr/bin/sparcv7/tnfxtract \ |
|
5589 |
$usr/bin/sparcv7/uptime \ |
|
5590 |
$usr/bin/sparcv7/w \ |
|
5591 |
$usr/sbin/sparcv7/intrstat \ |
|
5592 |
$usr/sbin/sparcv7/lockstat \ |
|
5593 |
$usr/sbin/sparcv7/prtconf \ |
|
5594 |
$usr/sbin/sparcv7/swap \ |
|
5595 |
$usr/sbin/sparcv7/sysdef \ |
|
5596 |
$usr/sbin/sparcv7/whodo \ |
|
5597 |
$root/kernel/dacf/consconfig_dacf \ |
|
5598 |
$root/kernel/drv/arp \ |
|
5599 |
$root/kernel/drv/audiocs \ |
|
5600 |
$root/kernel/drv/audioens \ |
|
5601 |
$root/kernel/drv/bofi \ |
|
5602 |
$root/kernel/drv/bpp \ |
|
5603 |
$root/kernel/drv/clone \ |
|
5604 |
$root/kernel/drv/cn \ |
|
5605 |
$root/kernel/drv/conskbd \ |
|
5606 |
$root/kernel/drv/consms \ |
|
5607 |
$root/kernel/drv/dad \ |
|
5608 |
$root/kernel/drv/devinfo \ |
|
5609 |
$root/kernel/drv/ecpp \ |
|
5610 |
$root/kernel/drv/ehci \ |
|
5611 |
$root/kernel/drv/esp \ |
|
5612 |
$root/kernel/drv/fas \ |
|
5613 |
$root/kernel/drv/fcip \ |
|
5614 |
$root/kernel/drv/fcp \ |
|
5615 |
$root/kernel/drv/fp \ |
|
5616 |
$root/kernel/drv/glm \ |
|
5617 |
$root/kernel/drv/hid \ |
|
5618 |
$root/kernel/drv/hme \ |
|
5619 |
$root/kernel/drv/hubd \ |
|
5620 |
$root/kernel/drv/icmp \ |
|
5621 |
$root/kernel/drv/icmp6 \ |
|
5622 |
$root/kernel/drv/ifp \ |
|
5623 |
$root/kernel/drv/ip \ |
|
5624 |
$root/kernel/drv/ip6 \ |
|
5625 |
$root/kernel/drv/ippctl \ |
|
5626 |
$root/kernel/drv/ipsecah \ |
|
5627 |
$root/kernel/drv/ipsecesp \ |
|
5628 |
$root/kernel/drv/isp \ |
|
5629 |
$root/kernel/drv/iwscn \ |
|
5630 |
$root/kernel/drv/keysock \ |
|
5631 |
$root/kernel/drv/le \ |
|
5632 |
$root/kernel/drv/lebuffer \ |
|
5633 |
$root/kernel/drv/llc1 \ |
|
5634 |
$root/kernel/drv/lofi \ |
|
5635 |
$root/kernel/drv/log \ |
|
5636 |
$root/kernel/drv/md \ |
|
5637 |
$root/kernel/drv/mm \ |
|
5638 |
$root/kernel/drv/mpt \ |
|
5639 |
$root/kernel/drv/nca \ |
|
5640 |
$root/kernel/drv/ohci \ |
|
5641 |
$root/kernel/drv/openeepr \ |
|
5642 |
$root/kernel/drv/options \ |
|
5643 |
$root/kernel/drv/pcata \ |
|
5644 |
$root/kernel/drv/pcelx \ |
|
5645 |
$root/kernel/drv/pcic \ |
|
5646 |
$root/kernel/drv/pcmem \ |
|
5647 |
$root/kernel/drv/pcram \ |
|
5648 |
$root/kernel/drv/pcs \ |
|
5649 |
$root/kernel/drv/pcser \ |
|
5650 |
$root/kernel/drv/pem \ |
|
5651 |
$root/kernel/drv/pln \ |
|
5652 |
$root/kernel/drv/poll \ |
|
5653 |
$root/kernel/drv/pseudo \ |
|
5654 |
$root/kernel/drv/ptc \ |
|
5655 |
$root/kernel/drv/ptsl \ |
|
5656 |
$root/kernel/drv/qlc \ |
|
5657 |
$root/kernel/drv/random \ |
|
5658 |
$root/kernel/drv/rts \ |
|
5659 |
$root/kernel/drv/sad \ |
|
5660 |
$root/kernel/drv/scsa2usb \ |
|
5661 |
$root/kernel/drv/scsi_vhci \ |
|
5662 |
$root/kernel/drv/sd \ |
|
5663 |
$root/kernel/drv/se \ |
|
5664 |
$root/kernel/drv/ses \ |
|
5665 |
$root/kernel/drv/sgen \ |
|
5666 |
$root/kernel/drv/soc \ |
|
5667 |
$root/kernel/drv/socal \ |
|
5668 |
$root/kernel/drv/spdsock \ |
|
5669 |
$root/kernel/drv/ssd \ |
|
5670 |
$root/kernel/drv/st \ |
|
5671 |
$root/kernel/drv/stp4020 \ |
|
5672 |
$root/kernel/drv/sy \ |
|
5673 |
$root/kernel/drv/sysmsg \ |
|
5674 |
$root/kernel/drv/tcp \ |
|
5675 |
$root/kernel/drv/tcp6 \ |
|
5676 |
$root/kernel/drv/tl \ |
|
5677 |
$root/kernel/drv/uata \ |
|
5678 |
$root/kernel/drv/udp \ |
|
5679 |
$root/kernel/drv/udp6 \ |
|
5680 |
$root/kernel/drv/ugen \ |
|
5681 |
$root/kernel/drv/usb_ac \ |
|
5682 |
$root/kernel/drv/usb_as \ |
|
5683 |
$root/kernel/drv/usb_mid \ |
|
5684 |
$root/kernel/drv/usbprn \ |
|
5685 |
$root/kernel/drv/usbser_edge \ |
|
5686 |
$root/kernel/drv/usoc \ |
|
5687 |
$root/kernel/drv/wc \ |
|
5688 |
$root/kernel/exec/aoutexec \ |
|
5689 |
$root/kernel/exec/elfexec \ |
|
5690 |
$root/kernel/exec/intpexec \ |
|
5691 |
$root/kernel/fs/autofs \ |
|
5692 |
$root/kernel/fs/cachefs \ |
|
5693 |
$root/kernel/fs/devfs \ |
|
5694 |
$root/kernel/fs/fifofs \ |
|
5695 |
$root/kernel/fs/hsfs \ |
|
5696 |
$root/kernel/fs/lofs \ |
|
5697 |
$root/kernel/fs/mntfs \ |
|
5698 |
$root/kernel/fs/nfs \ |
|
5699 |
$root/kernel/fs/procfs \ |
|
5700 |
$root/kernel/fs/sockfs \ |
|
5701 |
$root/kernel/fs/specfs \ |
|
5702 |
$root/kernel/fs/tmpfs \ |
|
5703 |
$root/kernel/fs/udfs \ |
|
5704 |
$root/kernel/fs/ufs \ |
|
5705 |
$root/kernel/ipp/dlcosmk \ |
|
5706 |
$root/kernel/ipp/dscpmk \ |
|
5707 |
$root/kernel/ipp/flowacct \ |
|
5708 |
$root/kernel/ipp/ipgpc \ |
|
5709 |
$root/kernel/ipp/tokenmt \ |
|
5710 |
$root/kernel/ipp/tswtclmt \ |
|
5711 |
$root/kernel/misc/amsrc1 \ |
|
5712 |
$root/kernel/misc/audiosup \ |
|
5713 |
$root/kernel/misc/busra \ |
|
5714 |
$root/kernel/misc/consconfig \ |
|
5715 |
$root/kernel/misc/dada \ |
|
5716 |
$root/kernel/misc/des \ |
|
5717 |
$root/kernel/misc/diaudio \ |
|
5718 |
$root/kernel/misc/fctl \ |
|
5719 |
$root/kernel/misc/fssnap_if \ |
|
5720 |
$root/kernel/misc/gld \ |
|
5721 |
$root/kernel/misc/hidparser \ |
|
5722 |
$root/kernel/misc/hpcsvc \ |
|
5723 |
$root/kernel/misc/ipc \ |
|
5724 |
$root/kernel/misc/kbtrans \ |
|
5725 |
$root/kernel/misc/kgss/do_kmech_krb5 \ |
|
5726 |
$root/kernel/misc/kgss/gl_kmech_krb5 \ |
|
5727 |
$root/kernel/misc/kgssapi \ |
|
5728 |
$root/kernel/misc/klmmod \ |
|
5729 |
$root/kernel/misc/klmops \ |
|
5730 |
$root/kernel/misc/krtld \ |
|
5731 |
$root/kernel/misc/md5 \ |
|
5732 |
$root/kernel/misc/md_hotspares \ |
|
5733 |
$root/kernel/misc/md_mirror \ |
|
5734 |
$root/kernel/misc/md_notify \ |
|
5735 |
$root/kernel/misc/md_raid \ |
|
5736 |
$root/kernel/misc/md_sp \ |
|
5737 |
$root/kernel/misc/md_stripe \ |
|
5738 |
$root/kernel/misc/md_trans \ |
|
5739 |
$root/kernel/misc/mixer \ |
|
5740 |
$root/kernel/misc/mpxio \ |
|
5741 |
$root/kernel/misc/nfs_dlboot \ |
|
5742 |
$root/kernel/misc/nfssrv \ |
|
5743 |
$root/kernel/misc/pcicfg \ |
|
5744 |
$root/kernel/misc/pcihp \ |
|
5745 |
$root/kernel/misc/phx \ |
|
5746 |
$root/kernel/misc/rpcsec \ |
|
5747 |
$root/kernel/misc/rpcsec_gss \ |
|
5748 |
$root/kernel/misc/rsmops \ |
|
5749 |
$root/kernel/misc/scsi \ |
|
5750 |
$root/kernel/misc/seg_drv \ |
|
5751 |
$root/kernel/misc/seg_mapdev \ |
|
5752 |
$root/kernel/misc/sha1 \ |
|
5753 |
$root/kernel/misc/strplumb \ |
|
5754 |
$root/kernel/misc/swapgeneric \ |
|
5755 |
$root/kernel/misc/tlimod \ |
|
5756 |
$root/kernel/misc/ufs_log \ |
|
5757 |
$root/kernel/misc/usba \ |
|
5758 |
$root/kernel/misc/usbser \ |
|
5759 |
$root/kernel/sched/TS \ |
|
5760 |
$root/kernel/sched/TS_DPTBL \ |
|
5761 |
$root/kernel/strmod/6to4tun \ |
|
5762 |
$root/kernel/strmod/arp \ |
|
5763 |
$root/kernel/strmod/atun \ |
|
5764 |
$root/kernel/strmod/authmd5h \ |
|
5765 |
$root/kernel/strmod/authsha1 \ |
|
5766 |
$root/kernel/strmod/bufmod \ |
|
5767 |
$root/kernel/strmod/connld \ |
|
5768 |
$root/kernel/strmod/dedump \ |
|
5769 |
$root/kernel/strmod/drcompat \ |
|
5770 |
$root/kernel/strmod/encr3des \ |
|
5771 |
$root/kernel/strmod/encraes \ |
|
5772 |
$root/kernel/strmod/encrbfsh \ |
|
5773 |
$root/kernel/strmod/encrdes \ |
|
5774 |
$root/kernel/strmod/icmp \ |
|
5775 |
$root/kernel/strmod/ip \ |
|
5776 |
$root/kernel/strmod/ipsecah \ |
|
5777 |
$root/kernel/strmod/ipsecesp \ |
|
5778 |
$root/kernel/strmod/keysock \ |
|
5779 |
$root/kernel/strmod/ldterm \ |
|
5780 |
$root/kernel/strmod/ms \ |
|
5781 |
$root/kernel/strmod/nca \ |
|
5782 |
$root/kernel/strmod/pckt \ |
|
5783 |
$root/kernel/strmod/pfmod \ |
|
5784 |
$root/kernel/strmod/pipemod \ |
|
5785 |
$root/kernel/strmod/ptem \ |
|
5786 |
$root/kernel/strmod/redirmod \ |
|
5787 |
$root/kernel/strmod/rpcmod \ |
|
5788 |
$root/kernel/strmod/rts \ |
|
5789 |
$root/kernel/strmod/tcp \ |
|
5790 |
$root/kernel/strmod/timod \ |
|
5791 |
$root/kernel/strmod/tirdwr \ |
|
5792 |
$root/kernel/strmod/ttcompat \ |
|
5793 |
$root/kernel/strmod/tun \ |
|
5794 |
$root/kernel/strmod/udp \ |
|
5795 |
$root/kernel/strmod/usb_ah \ |
|
5796 |
$root/kernel/strmod/usbkbm \ |
|
5797 |
$root/kernel/strmod/usbms \ |
|
5798 |
$root/kernel/sys/c2audit \ |
|
5799 |
$root/kernel/sys/doorfs \ |
|
5800 |
$root/kernel/sys/inst_sync \ |
|
5801 |
$root/kernel/sys/kaio \ |
|
5802 |
$root/kernel/sys/msgsys \ |
|
5803 |
$root/kernel/sys/nfs \ |
|
5804 |
$root/kernel/sys/pipe \ |
|
5805 |
$root/kernel/sys/pset \ |
|
5806 |
$root/kernel/sys/rpcmod \ |
|
5807 |
$root/kernel/sys/semsys \ |
|
5808 |
$root/kernel/sys/shmsys \ |
|
5809 |
$root/platform/SUNW,Ultra-250/kernel/drv/envctrltwo \ |
|
5810 |
$root/platform/SUNW,Ultra-250/kernel/misc/platmod \ |
|
5811 |
$root/platform/SUNW,Ultra-4/kernel/drv/envctrl \ |
|
5812 |
$root/platform/SUNW,Ultra-4/kernel/misc/platmod \ |
|
5813 |
$root/platform/SUNW,Ultra-5_10/kernel/misc/platmod \ |
|
5814 |
$root/platform/SUNW,Ultra-80/kernel/misc/platmod \ |
|
5815 |
$root/platform/SUNW,Ultra-Enterprise-10000/kernel/cpu/SUNW,UltraSPARC \ |
|
5816 |
$root/platform/SUNW,Ultra-Enterprise-10000/kernel/cpu/SUNW,UltraSPARC-II \ |
|
5817 |
$root/platform/SUNW,Ultra-Enterprise-10000/kernel/drv/cvc \ |
|
5818 |
$root/platform/SUNW,Ultra-Enterprise-10000/kernel/drv/cvcredir \ |
|
5819 |
$root/platform/SUNW,Ultra-Enterprise-10000/kernel/drv/idn \ |
|
5820 |
$root/platform/SUNW,Ultra-Enterprise-10000/kernel/drv/ngdr \ |
|
5821 |
$root/platform/SUNW,Ultra-Enterprise-10000/kernel/drv/pcipsy \ |
|
5822 |
$root/platform/SUNW,Ultra-Enterprise-10000/kernel/drv/rootnex \ |
|
5823 |
$root/platform/SUNW,Ultra-Enterprise-10000/kernel/drv/sbus \ |
|
5824 |
$root/platform/SUNW,Ultra-Enterprise-10000/kernel/misc/ngdrmach \ |
|
5825 |
$root/platform/SUNW,Ultra-Enterprise-10000/kernel/misc/platmod \ |
|
5826 |
$root/platform/SUNW,Ultra-Enterprise-10000/kernel/unix \ |
|
5827 |
$root/platform/SUNW,Ultra-Enterprise/kernel/drv/ac \ |
|
5828 |
$root/platform/SUNW,Ultra-Enterprise/kernel/drv/central \ |
|
5829 |
$root/platform/SUNW,Ultra-Enterprise/kernel/drv/environ \ |
|
5830 |
$root/platform/SUNW,Ultra-Enterprise/kernel/drv/fhc \ |
|
5831 |
$root/platform/SUNW,Ultra-Enterprise/kernel/drv/simmstat \ |
|
5832 |
$root/platform/SUNW,Ultra-Enterprise/kernel/drv/sram \ |
|
5833 |
$root/platform/SUNW,Ultra-Enterprise/kernel/drv/sysctrl \ |
|
5834 |
$root/platform/SUNW,Ultra-Enterprise/kernel/misc/platmod \ |
|
5835 |
$root/platform/sun4u/boot.conf \ |
|
5836 |
$root/platform/sun4u/kernel/cpu/SUNW,UltraSPARC \ |
|
5837 |
$root/platform/sun4u/kernel/cpu/SUNW,UltraSPARC-II \ |
|
5838 |
$root/platform/sun4u/kernel/cpu/SUNW,UltraSPARC-III \ |
|
5839 |
$root/platform/sun4u/kernel/cpu/SUNW,UltraSPARC-III+ \ |
|
5840 |
$root/platform/sun4u/kernel/cpu/SUNW,UltraSPARC-IIIi \ |
|
5841 |
$root/platform/sun4u/kernel/cpu/SUNW,UltraSPARC-IIe \ |
|
5842 |
$root/platform/sun4u/kernel/cpu/SUNW,UltraSPARC-IIi \ |
|
5843 |
$root/platform/sun4u/kernel/cpu/SUNW,UltraSPARC-IV \ |
|
5844 |
$root/platform/sun4u/kernel/drv/bwtwo \ |
|
5845 |
$root/platform/sun4u/kernel/drv/cgsix \ |
|
5846 |
$root/platform/sun4u/kernel/drv/cgthree \ |
|
5847 |
$root/platform/sun4u/kernel/drv/cpc \ |
|
5848 |
$root/platform/sun4u/kernel/drv/db21554 \ |
|
5849 |
$root/platform/sun4u/kernel/drv/dma \ |
|
5850 |
$root/platform/sun4u/kernel/drv/ebus \ |
|
5851 |
$root/platform/sun4u/kernel/drv/fd \ |
|
5852 |
$root/platform/sun4u/kernel/drv/ledma \ |
|
5853 |
$root/platform/sun4u/kernel/drv/memtest \ |
|
5854 |
$root/platform/sun4u/kernel/drv/pci_pci \ |
|
5855 |
$root/platform/sun4u/kernel/drv/pcipsy \ |
|
5856 |
$root/platform/sun4u/kernel/drv/power \ |
|
5857 |
$root/platform/sun4u/kernel/drv/rootnex \ |
|
5858 |
$root/platform/sun4u/kernel/drv/sbbc \ |
|
5859 |
$root/platform/sun4u/kernel/drv/sbus \ |
|
5860 |
$root/platform/sun4u/kernel/drv/sbusmem \ |
|
5861 |
$root/platform/sun4u/kernel/drv/sf \ |
|
5862 |
$root/platform/sun4u/kernel/drv/simba \ |
|
5863 |
$root/platform/sun4u/kernel/drv/su \ |
|
5864 |
$root/platform/sun4u/kernel/drv/tod \ |
|
5865 |
$root/platform/sun4u/kernel/drv/trapstat \ |
|
5866 |
$root/platform/sun4u/kernel/drv/zs \ |
|
5867 |
$root/platform/sun4u/kernel/drv/zsh \ |
|
5868 |
$root/platform/sun4u/kernel/genunix \ |
|
5869 |
$root/platform/sun4u/kernel/misc/bootdev \ |
|
5870 |
$root/platform/sun4u/kernel/misc/cpr \ |
|
5871 |
$root/platform/sun4u/kernel/misc/forthdebug \ |
|
5872 |
$root/platform/sun4u/kernel/misc/kgss/do_kmech_krb5 \ |
|
5873 |
$root/platform/sun4u/kernel/misc/kgss/gl_kmech_krb5 \ |
|
5874 |
$root/platform/sun4u/kernel/misc/md5 \ |
|
5875 |
$root/platform/sun4u/kernel/misc/obpsym \ |
|
5876 |
$root/platform/sun4u/kernel/misc/pcmcia \ |
|
5877 |
$root/platform/sun4u/kernel/misc/platmod \ |
|
5878 |
$root/platform/sun4u/kernel/misc/vis \ |
|
5879 |
$root/platform/sun4u/kernel/strmod/kb \ |
|
5880 |
$root/platform/sun4u/kernel/sys/cpc \ |
|
5881 |
$root/platform/sun4u/kernel/tod/todmostek \ |
|
5882 |
$root/platform/sun4u/kernel/tod/todstarfire \ |
|
5883 |
$usr/include/v7/sys/mon_clock.h \ |
|
5884 |
$usr/kernel/drv/dump \ |
|
5885 |
$usr/kernel/drv/fssnap \ |
|
5886 |
$usr/kernel/drv/gen_drv \ |
|
5887 |
$usr/kernel/drv/kstat \ |
|
5888 |
$usr/kernel/drv/ksyms \ |
|
5889 |
$usr/kernel/drv/llc2 \ |
|
5890 |
$usr/kernel/drv/lo \ |
|
5891 |
$usr/kernel/drv/lockstat \ |
|
5892 |
$usr/kernel/drv/logindmux \ |
|
5893 |
$usr/kernel/drv/pm \ |
|
5894 |
$usr/kernel/drv/pshot \ |
|
5895 |
$usr/kernel/drv/ptm \ |
|
5896 |
$usr/kernel/drv/pts \ |
|
5897 |
$usr/kernel/drv/rsm \ |
|
5898 |
$usr/kernel/drv/sppp \ |
|
5899 |
$usr/kernel/drv/sppptun \ |
|
5900 |
$usr/kernel/drv/sysevent \ |
|
5901 |
$usr/kernel/drv/tidg \ |
|
5902 |
$usr/kernel/drv/tivc \ |
|
5903 |
$usr/kernel/drv/tmux \ |
|
5904 |
$usr/kernel/drv/tnf \ |
|
5905 |
$usr/kernel/drv/vol \ |
|
5906 |
$usr/kernel/drv/winlock \ |
|
5907 |
$usr/kernel/exec/javaexec \ |
|
5908 |
$usr/kernel/fs/fdfs \ |
|
5909 |
$usr/kernel/fs/namefs \ |
|
5910 |
$usr/kernel/fs/pcfs \ |
|
5911 |
$usr/kernel/sched/FSS \ |
|
5912 |
$usr/kernel/sched/FX \ |
|
5913 |
$usr/kernel/sched/FX_DPTBL \ |
|
5914 |
$usr/kernel/sched/IA \ |
|
5915 |
$usr/kernel/sched/RT \ |
|
5916 |
$usr/kernel/sched/RT_DPTBL \ |
|
5917 |
$usr/kernel/strmod/cryptmod \ |
|
5918 |
$usr/kernel/strmod/lmodb \ |
|
5919 |
$usr/kernel/strmod/lmode \ |
|
5920 |
$usr/kernel/strmod/lmodr \ |
|
5921 |
$usr/kernel/strmod/lmodt \ |
|
5922 |
$usr/kernel/strmod/rlmod \ |
|
5923 |
$usr/kernel/strmod/spppasyn \ |
|
5924 |
$usr/kernel/strmod/spppcomp \ |
|
5925 |
$usr/kernel/strmod/sppptun \ |
|
5926 |
$usr/kernel/strmod/telmod \ |
|
5927 |
$usr/kernel/sys/acctctl \ |
|
5928 |
$usr/kernel/sys/exacctsys \ |
|
5929 |
$usr/kernel/sys/sysacct \ |
|
5930 |
$usr/lib/gss/mech_spnego.so \ |
|
5931 |
$usr/lib/gss/mech_spnego.so.1 \ |
|
5932 |
$usr/lib/mdb/kvm/cpc.so \ |
|
5933 |
$usr/lib/mdb/kvm/genunix.so \ |
|
5934 |
$usr/lib/mdb/kvm/ip.so \ |
|
5935 |
$usr/lib/mdb/kvm/ipc.so \ |
|
5936 |
$usr/lib/mdb/kvm/ipp.so \ |
|
5937 |
$usr/lib/mdb/kvm/isp.so \ |
|
5938 |
$usr/lib/mdb/kvm/krtld.so \ |
|
5939 |
$usr/lib/mdb/kvm/lofs.so \ |
|
5940 |
$usr/lib/mdb/kvm/logindmux.so \ |
|
5941 |
$usr/lib/mdb/kvm/mdb_ks.so \ |
|
5942 |
$usr/lib/mdb/kvm/nca.so \ |
|
5943 |
$usr/lib/mdb/kvm/nfs.so \ |
|
5944 |
$usr/lib/mdb/kvm/ptm.so \ |
|
5945 |
$usr/lib/mdb/kvm/random.so \ |
|
5946 |
$usr/lib/mdb/kvm/sd.so \ |
|
5947 |
$usr/lib/mdb/kvm/sppp.so \ |
|
5948 |
$usr/lib/mdb/kvm/ssd.so \ |
|
5949 |
$usr/lib/mdb/kvm/ufs_log.so \ |
|
5950 |
$usr/lib/mdb/kvm/usba.so \ |
|
5951 |
$usr/lib/sparcv9/gss/mech_spnego.so \ |
|
5952 |
$usr/lib/sparcv9/gss/mech_spnego.so.1 \ |
|
5953 |
$usr/platform/SUNW,Ultra-1 \ |
|
5954 |
$usr/platform/SUNW,Ultra-250/doc \ |
|
5955 |
$usr/platform/SUNW,Ultra-250/lib/flash-update.sh \ |
|
5956 |
$usr/platform/SUNW,Ultra-250/lib/prom \ |
|
5957 |
$usr/platform/SUNW,Ultra-Enterprise-10000/doc \ |
|
5958 |
$usr/platform/SUNW,Ultra-Enterprise-10000/lib/flash-update.sh \ |
|
5959 |
$usr/platform/SUNW,Ultra-Enterprise-10000/lib/prom \ |
|
5960 |
$usr/platform/sun4u/lib/mdb/kvm/unix.so \ |
|
5961 |
$usr/platform/sun4u/lib/prom/SUNW,Ultra-1 > /dev/null 2>&1; |
|
5962 |
print "done."; |
|
5963 |
fi; |
|
5964 |
||
5965 |
# |
|
5966 |
# Remove kmdbmod from /kernel |
|
5967 |
# |
|
5968 |
rm -f $root/kernel/misc/sparcv9/kmdbmod |
|
5969 |
||
5970 |
# |
|
5971 |
# Remove obsolete drivers/header files as a result of sun4v source |
|
5972 |
# code reorg |
|
5973 |
# |
|
5974 |
rm -f $root/platform/sun4u/kernel/drv/sparcv9/pci_pci |
|
5975 |
rm -f $root/platform/sun4u/kernel/misc/sparcv9/pcmcia |
|
5976 |
rm -f $usr/include/v9/sys/traptrace.h |
|
5977 |
rm -f $usr/platform/sun4u/include/sys/spitasi.h |
|
78
0e13b95244dd
6289703 Remove SUNWust1u.v package -- we do not need it
ae112802
parents:
25
diff
changeset
|
5978 |
rm -f $usr/kernel/pcbe/sparcv9/pcbe.SUNW,UltraSPARC-T1 |
0 | 5979 |
|
5980 |
# |
|
5981 |
# Remove the IPsec encryption and authentication modules. |
|
5982 |
# IPsec now uses the Kernel Crypto Framework for crypto. |
|
5983 |
# |
|
5984 |
rm -f $rootprefix/kernel/strmod/encr3des |
|
5985 |
rm -f $rootprefix/kernel/strmod/encrdes |
|
5986 |
rm -f $rootprefix/kernel/strmod/encrbfsh |
|
5987 |
rm -f $rootprefix/kernel/strmod/encraes |
|
5988 |
rm -f $rootprefix/kernel/strmod/authmd5h |
|
5989 |
rm -f $rootprefix/kernel/strmod/authsha1 |
|
5990 |
rm -f $rootprefix/kernel/strmod/sparcv9/encr3des |
|
5991 |
rm -f $rootprefix/kernel/strmod/sparcv9/encrdes |
|
5992 |
rm -f $rootprefix/kernel/strmod/sparcv9/encrbfsh |
|
5993 |
rm -f $rootprefix/kernel/strmod/sparcv9/encraes |
|
5994 |
rm -f $rootprefix/kernel/strmod/sparcv9/authmd5h |
|
5995 |
rm -f $rootprefix/kernel/strmod/sparcv9/authsha1 |
|
5996 |
||
5997 |
# |
|
5998 |
# Remove obsolete SSA utility, firmware and fcode. |
|
5999 |
# usr/lib/firmware/ssa contains ssafirmware |
|
6000 |
# |
|
6001 |
rm -rf $usr/lib/firmware/ssa |
|
6002 |
rm -f $usr/lib/firmware/fc_s/fc_s_fcode |
|
6003 |
rm -f $usr/sbin/ssaadm |
|
6004 |
||
6005 |
# |
|
6006 |
# Remove seg_drv, seg_mapdev driver |
|
6007 |
# |
|
6008 |
rm -f $root/kernel/misc/seg_drv |
|
6009 |
rm -f $root/kernel/misc/sparcv9/seg_drv |
|
6010 |
rm -f $usr/include/sys/seg_drv.h |
|
6011 |
rm -f $root/kernel/misc/seg_mapdev |
|
6012 |
rm -f $root/kernel/misc/sparcv9/seg_mapdev |
|
6013 |
||
6014 |
# |
|
6015 |
# Remove mpxio module |
|
6016 |
# |
|
6017 |
rm -f $root/kernel/misc/sparcv9/mpxio |
|
6018 |
||
6019 |
# |
|
6020 |
# Remove mpxio/vhci adb macros. |
|
6021 |
# |
|
6022 |
if [ $target_isa = sparc -a $zone = global ]; then |
|
6023 |
rm -f $usr/lib/adb/mdi_client |
|
6024 |
rm -f $usr/lib/adb/sparcv9/mdi_client |
|
6025 |
rm -f $usr/lib/adb/mdi_pathinfo |
|
6026 |
rm -f $usr/lib/adb/sparcv9/mdi_pathinfo |
|
6027 |
rm -f $usr/lib/adb/mdi_phci |
|
6028 |
rm -f $usr/lib/adb/sparcv9/mdi_phci |
|
6029 |
rm -f $usr/lib/adb/mdi_vhci |
|
6030 |
rm -f $usr/lib/adb/sparcv9/mdi_vhci |
|
6031 |
rm -f $usr/lib/adb/scsi_vhci_pkt |
|
6032 |
rm -f $usr/lib/adb/sparcv9/scsi_vhci_pkt |
|
6033 |
rm -f $usr/lib/adb/scsi_vhci_softstate |
|
6034 |
rm -f $usr/lib/adb/sparcv9/scsi_vhci_softstate |
|
6035 |
fi |
|
6036 |
||
6037 |
# |
|
6038 |
# Diskless clients have already extracted /usr so don't delete this |
|
6039 |
# Non-global zones never extracts /usr so don't delete these |
|
6040 |
# |
|
6041 |
if [ $diskless = no -a $zone = global ]; then |
|
6042 |
rm -f $usr/sbin/stmsboot |
|
2577
630a8010260c
6386887 vhci_attach registers uninitialized dma attributes
ramat
parents:
2572
diff
changeset
|
6043 |
|
630a8010260c
6386887 vhci_attach registers uninitialized dma attributes
ramat
parents:
2572
diff
changeset
|
6044 |
rm -f $usr/lib/mdb/kvm/mpxio.so |
630a8010260c
6386887 vhci_attach registers uninitialized dma attributes
ramat
parents:
2572
diff
changeset
|
6045 |
rm -f $usr/lib/mdb/kvm/sparcv9/mpxio.so |
630a8010260c
6386887 vhci_attach registers uninitialized dma attributes
ramat
parents:
2572
diff
changeset
|
6046 |
rm -f $usr/lib/mdb/kvm/amd64/mpxio.so |
630a8010260c
6386887 vhci_attach registers uninitialized dma attributes
ramat
parents:
2572
diff
changeset
|
6047 |
rm -f $usr/lib/mdb/kvm/scsi_vhci.so |
630a8010260c
6386887 vhci_attach registers uninitialized dma attributes
ramat
parents:
2572
diff
changeset
|
6048 |
rm -f $usr/lib/mdb/kvm/sparcv9/scsi_vhci.so |
630a8010260c
6386887 vhci_attach registers uninitialized dma attributes
ramat
parents:
2572
diff
changeset
|
6049 |
rm -f $usr/lib/mdb/kvm/amd64/scsi_vhci.so |
0 | 6050 |
fi |
6051 |
rm -f $root/lib/mpxio/mpxio |
|
6052 |
rm -f $root/lib/mpxio/stmsboot_util |
|
6053 |
||
2577
630a8010260c
6386887 vhci_attach registers uninitialized dma attributes
ramat
parents:
2572
diff
changeset
|
6054 |
rm -f $root/kernel/kmdb/mpxio |
630a8010260c
6386887 vhci_attach registers uninitialized dma attributes
ramat
parents:
2572
diff
changeset
|
6055 |
rm -f $root/kernel/kmdb/sparcv9/mpxio |
630a8010260c
6386887 vhci_attach registers uninitialized dma attributes
ramat
parents:
2572
diff
changeset
|
6056 |
rm -f $root/kernel/kmdb/amd64/mpxio |
630a8010260c
6386887 vhci_attach registers uninitialized dma attributes
ramat
parents:
2572
diff
changeset
|
6057 |
rm -f $root/kernel/kmdb/scsi_vhci |
630a8010260c
6386887 vhci_attach registers uninitialized dma attributes
ramat
parents:
2572
diff
changeset
|
6058 |
rm -f $root/kernel/kmdb/sparcv9/scsi_vhci |
630a8010260c
6386887 vhci_attach registers uninitialized dma attributes
ramat
parents:
2572
diff
changeset
|
6059 |
rm -f $root/kernel/kmdb/amd64/scsi_vhci |
630a8010260c
6386887 vhci_attach registers uninitialized dma attributes
ramat
parents:
2572
diff
changeset
|
6060 |
|
0 | 6061 |
# |
6062 |
# Remove rpcib misc module (converted to driver) |
|
6063 |
# |
|
6064 |
rm -f $root/kernel/misc/sparcv9/rpcib |
|
6065 |
rm -f $root/kernel/drv/sparcv9/rpcib |
|
6066 |
||
6067 |
# |
|
6068 |
# Remove old smartcard header files |
|
6069 |
# |
|
6070 |
||
6071 |
rm -f \ |
|
6072 |
$usr/include/smartcard.h \ |
|
6073 |
$usr/include/smartcard/ocf_authenticate.h \ |
|
6074 |
$usr/include/smartcard/ocf_core.h \ |
|
6075 |
$usr/include/smartcard/ocf_core_cardservices.h |
|
6076 |
||
6077 |
# |
|
6078 |
# Remove smartcard libraries that should not have been shipped. |
|
6079 |
# |
|
6080 |
rm -rf $usr/lib/smartcard/sparcv9/ \ |
|
6081 |
$usr/share/lib/smartcard/scmtester.jar |
|
6082 |
||
6083 |
# |
|
6084 |
# Remove external smartcard reader driver |
|
6085 |
# |
|
6086 |
rm -f $usr/share/lib/smartcard/scmrsr3.jar |
|
6087 |
||
6088 |
# |
|
6089 |
# Remove old internal smartcard reader driver |
|
6090 |
# |
|
6091 |
rm -f $usr/share/lib/smartcard/scmiscr.jar |
|
6092 |
rm -f $usr/lib/smartcard/libSCMI2CNative.so |
|
6093 |
rm -f $usr/lib/smartcard/libSCMI2CNative.so.1 |
|
6094 |
||
6095 |
# |
|
6096 |
# Remove Smart OS |
|
6097 |
# |
|
6098 |
rm -f $usr/share/lib/smartcard/smartos.jar |
|
6099 |
||
6100 |
# |
|
6101 |
# Remove drivers & header files for EOL of soc & pln drivers |
|
6102 |
# as per PSARC/2003/233 |
|
6103 |
# |
|
6104 |
rm -f $root/kernel/drv/pln.conf |
|
6105 |
rm -f $root/kernel/drv/sparcv9/pln |
|
6106 |
rm -f $root/kernel/drv/sparcv9/soc |
|
6107 |
rm -f $usr/include/sys/socvar.h |
|
6108 |
rm -f $usr/include/sys/socmap.h |
|
6109 |
rm -f $usr/include/sys/soc_cq_defs.h |
|
6110 |
rm -f $usr/include/sys/socreg.h |
|
6111 |
rm -f $usr/include/sys/scsi/adapters/plndef.h |
|
6112 |
rm -f $usr/include/sys/scsi/adapters/plnvar.h |
|
6113 |
rm -f $usr/include/sys/scsi/adapters/ssaisp.h |
|
6114 |
rm -f $usr/include/sys/scsi/targets/pln_ctlr.h |
|
6115 |
rm -f $usr/include/sys/scsi/targets/osesio.h |
|
6116 |
||
6117 |
# |
|
6118 |
# PSARC/2003/629 Common Solaris Target Disk Driver |
|
6119 |
# remove adb macro "scsi_disk" for the x86 platform |
|
6120 |
# |
|
6121 |
if [ $target_isa = i386 ]; then |
|
6122 |
rm -f $usr/lib/adb/scsi_disk |
|
6123 |
fi |
|
6124 |
||
6125 |
# Remove CPCv1 API header per PSARC/2004/648 |
|
6126 |
rm -f $usr/include/sys/cpc_event.h |
|
6127 |
||
693 | 6128 |
# Remove headers per PSARC/2005/561 |
6129 |
rm -f $usr/include/sys/nexusintr.h |
|
6130 |
rm -f $usr/platform/sun4u/include/sys/nexusintr_impl.h |
|
6131 |
rm -f $usr/platform/sun4v/include/sys/nexusintr_impl.h |
|
6132 |
||
0 | 6133 |
# Remove usr/lib/mail which has moved to etc/mail/cf, but first, |
6134 |
# attempt to migrate any user-added files, which primarily live |
|
6135 |
# under usr/lib/mail/cf . Blow away the seven files which we |
|
6136 |
# ship under that directory, then move any that remain to the |
|
6137 |
# new location, which we will `mkdir -p` just to be safe. |
|
6138 |
# If the zone in question is non-global, then skip all this. |
|
6139 |
# |
|
6140 |
if [ $zone = "global" ]; then |
|
6141 |
# -d follow sym-links: make sure it's not a link. |
|
6142 |
if [ -d $usr/lib/mail -a ! -h $usr/lib/mail ]; then |
|
6143 |
# Only do this if usr/lib/mail is still a directory; |
|
6144 |
# bfu'ing backwards does not merit such migration. |
|
6145 |
rm -f $usr/lib/mail/cf/Makefile |
|
6146 |
rm -f $usr/lib/mail/cf/main.cf |
|
6147 |
rm -f $usr/lib/mail/cf/main.mc |
|
6148 |
rm -f $usr/lib/mail/cf/submit.cf |
|
6149 |
rm -f $usr/lib/mail/cf/submit.mc |
|
6150 |
rm -f $usr/lib/mail/cf/subsidiary.cf |
|
6151 |
rm -f $usr/lib/mail/cf/subsidiary.mc |
|
6152 |
mkdir -p -m 0755 $root/etc/mail/cf/cf |
|
6153 |
mv $usr/lib/mail/cf/* $root/etc/mail/cf/cf >/dev/null 2>&1 |
|
6154 |
fi |
|
6155 |
rm -rf $usr/lib/mail |
|
6156 |
fi |
|
6157 |
||
6158 |
# |
|
6159 |
# Remove drivers and header files for EOF of Lance Ethernet |
|
6160 |
# driver(le) as per PSARC/2003/335. |
|
6161 |
# |
|
6162 |
rm -f $root/kernel/drv/le |
|
6163 |
rm -f $root/kernel/drv/sparcv9/le |
|
6164 |
rm -f $root/kernel/drv/lebuffer |
|
6165 |
rm -f $root/kernel/drv/sparcv9/lebuffer |
|
6166 |
rm -f $root/platform/sun4u/kernel/drv/ledma |
|
6167 |
rm -f $root/platform/sun4u/kernel/drv/sparcv9/ledma |
|
6168 |
rm -f $usr/include/sys/le.h |
|
6169 |
rm -f $usr/include/sys/lance.h |
|
6170 |
rm -f $usr/lib/adb/le |
|
6171 |
rm -f $usr/lib/adb/lestr |
|
6172 |
||
6173 |
# |
|
6174 |
# Remove drivers and header files for EOF of ieef driver as |
|
6175 |
# per PSARC/2003/009 |
|
6176 |
# |
|
6177 |
rm -f $root/kernel/drv/ieef |
|
6178 |
rm -f $root/kernel/drv/ieef.conf |
|
6179 |
rm -f $usr/include/sys/ieef.h |
|
6180 |
rm -f $root/boot/solaris/drivers/notisa.010/ieef.bef |
|
6181 |
||
6182 |
# |
|
6183 |
# Remove drivers and header files for EOF of elx driver as |
|
6184 |
# per PSARC/2003/770 |
|
6185 |
# |
|
6186 |
rm -f $root/platform/i86pc/kernel/drv/elx |
|
6187 |
rm -f $root/platform/i86pc/kernel/drv/elx.conf |
|
6188 |
rm -f $usr/include/sys/elx.h |
|
6189 |
rm -f $root/boot/solaris/drivers/isa.175/elx.bef |
|
6190 |
||
6191 |
# |
|
6192 |
# Remove drivers for EOF of pe driver as per PSARC/2004/051 |
|
6193 |
# |
|
6194 |
rm -f $root/kernel/drv/pe |
|
6195 |
rm -f $root/kernel/drv/pe.conf |
|
6196 |
rm -f $root/boot/solaris/drivers/isa.125/pe3.bef |
|
6197 |
||
6198 |
# |
|
6199 |
# Remove drivers for EOF of Compaq NCR, Compaq SMART2, AMI Mega |
|
6200 |
# card and /usr/bin/smart2cfg as per PSARC/2003/701 and |
|
6201 |
# PSARC/2004/207 |
|
6202 |
# |
|
6203 |
rm -f $root/kernel/drv/cpqncr |
|
6204 |
rm -f $root/kernel/drv/cpqncr.conf |
|
6205 |
rm -f $root/boot/solaris/drivers/notisa.020/cpqncr.bef |
|
6206 |
rm -f $root/platform/i86pc/kernel/drv/smartii |
|
6207 |
rm -f $root/platform/i86pc/kernel/drv/smartii.conf |
|
6208 |
rm -f $usr/bin/smart2cfg |
|
6209 |
rm -f $root/kernel/drv/mega |
|
6210 |
rm -f $root/kernel/drv/mega.conf |
|
6211 |
rm -f $root/boot/solaris/drivers/notisa.010/mega.bef |
|
6212 |
rm -f $root/kernel/mach/compaq |
|
6213 |
rm -f $root/kernel/mach/corollary |
|
6214 |
||
6215 |
# |
|
6216 |
# Remove eisa nexus driver and header files for EOF of EISA |
|
6217 |
# support as per PSARC/2003/650 |
|
6218 |
# |
|
6219 |
rm -f $root/platform/i86pc/kernel/drv/eisa |
|
6220 |
rm -f $usr/platform/i86pc/include/sys/eisarom.h |
|
6221 |
rm -f $usr/platform/i86pc/include/sys/nvm.h |
|
6222 |
||
6223 |
# |
|
6224 |
# Remove xmem headers (they moved back to usr/include/sys/fs) |
|
6225 |
# |
|
6226 |
rm -f $usr/include/ia32/sys/fs/xmem.h |
|
6227 |
rm -f $usr/include/ia32/sys/fs/seg_xmem.h |
|
6228 |
rm -rf $usr/include/ia32/sys/fs |
|
6229 |
||
6230 |
# |
|
6231 |
# Remove junk headers |
|
6232 |
# |
|
6233 |
rm -f $usr/platform/i86pc/include/sys/mcdma.h |
|
6234 |
rm -f $usr/platform/i86pc/include/sys/xque.h |
|
6235 |
||
6236 |
# |
|
6237 |
# Remove obsolete x86 hat layer and associated adb scripts |
|
6238 |
# |
|
6239 |
rm -f $root/platform/i86pc/kernel/mmu/mmu32 |
|
6240 |
rm -f $root/platform/i86pc/kernel/mmu/mmu36 |
|
6241 |
rm -rf $root/platform/i86pc/kernel/mmu |
|
6242 |
rm -f $usr/lib/adb/hwpp |
|
6243 |
rm -f $usr/lib/adb/hatppp |
|
6244 |
rm -f $usr/lib/adb/hat.nxt |
|
6245 |
rm -f $usr/lib/adb/hwpp.nxt |
|
6246 |
||
6247 |
# |
|
1106 | 6248 |
# Remove drivers for EOF of chs as per PSARC/2005/581 |
6249 |
# |
|
6250 |
rm -f $root/kernel/drv/chs |
|
6251 |
rm -f $root/kernel/drv/chs.conf |
|
6252 |
rm -f $root/boot/solaris/drivers/notisa.020/chs.bef |
|
6253 |
||
6254 |
# |
|
6255 |
# Remove drivers & header files for EOF of dbri as per PSARC 2005/582 |
|
6256 |
# |
|
6257 |
rm -f $root/kernel/drv/sparcv9/dbri |
|
6258 |
rm -f $root/usr/include/sys/dbriio.h |
|
6259 |
rm -f $root/usr/include/sys/mmcodecreg.h |
|
6260 |
||
6261 |
# |
|
0 | 6262 |
# Remove drivers for EOF of pcscsi as per PSARC/2005/003 |
6263 |
# |
|
6264 |
rm -f $root/kernel/drv/pcscsi |
|
6265 |
rm -f $root/kernel/drv/pcscsi.conf |
|
6266 |
rm -f $root/boot/solaris/drivers/notisa.010/pcscsi.bef |
|
6267 |
||
6268 |
# |
|
6269 |
# Remove drivers for EOF of dpt as per PSARC/2003/701 |
|
6270 |
# |
|
6271 |
rm -f $root/boot/solaris/drivers/isa.125/dpt.bef |
|
6272 |
rm -f $root/platform/i86pc/kernel/drv/dpt |
|
6273 |
rm -f $root/platform/i86pc/kernel/drv/dpt.conf |
|
6274 |
rm -rf $usr/include/sys/dktp/dpt |
|
6275 |
||
6276 |
# |
|
6277 |
# Remove drivers for EOF of mlx driver as per PSARC/2003/701 |
|
6278 |
# |
|
6279 |
rm -f $root/boot/solaris/drivers/notisa.010/mlx.bef |
|
6280 |
rm -f $root/platform/i86pc/kernel/drv/mlx |
|
6281 |
rm -f $root/platform/i86pc/kernel/drv/mlx.conf |
|
6282 |
rm -rf $usr/include/sys/dktp/mlx |
|
753 | 6283 |
|
6284 |
# |
|
786 | 6285 |
# Remove snlb |
6286 |
# |
|
6287 |
rm -f $root/kernel/misc/snlb |
|
6288 |
rm -f $root/kernel/misc/amd64/snlb |
|
6289 |
rm -f $root/usr/include/sys/dktp/dklb.h |
|
6290 |
rm -f $root/usr/include/sys/dktp/snlb.h |
|
6291 |
||
6292 |
# |
|
753 | 6293 |
# Remove objmgr |
6294 |
# |
|
6295 |
rm -f $root/kernel/drv/objmgr.conf |
|
6296 |
rm -f $root/kernel/drv/objmgr |
|
6297 |
rm -f $root/kernel/drv/amd64/objmgr |
|
6298 |
rm -f $root/usr/include/sys/dktp/objmgr.h |
|
2015
530b0eef593b
6422444 update inquiry.h to reflect latest spc-3 device types
taylor
parents:
1991
diff
changeset
|
6299 |
|
530b0eef593b
6422444 update inquiry.h to reflect latest spc-3 device types
taylor
parents:
1991
diff
changeset
|
6300 |
# |
530b0eef593b
6422444 update inquiry.h to reflect latest spc-3 device types
taylor
parents:
1991
diff
changeset
|
6301 |
# Remove other unused headers |
530b0eef593b
6422444 update inquiry.h to reflect latest spc-3 device types
taylor
parents:
1991
diff
changeset
|
6302 |
# |
530b0eef593b
6422444 update inquiry.h to reflect latest spc-3 device types
taylor
parents:
1991
diff
changeset
|
6303 |
rm -f $root/usr/include/sys/scsi/impl/pkt_wrapper.h |
530b0eef593b
6422444 update inquiry.h to reflect latest spc-3 device types
taylor
parents:
1991
diff
changeset
|
6304 |
rm -f $root/usr/include/sys/dktp/hba.h |
530b0eef593b
6422444 update inquiry.h to reflect latest spc-3 device types
taylor
parents:
1991
diff
changeset
|
6305 |
rm -f $root/usr/include/sys/dktp/cdtypes.h |
530b0eef593b
6422444 update inquiry.h to reflect latest spc-3 device types
taylor
parents:
1991
diff
changeset
|
6306 |
rm -f $root/usr/include/sys/dktp/scdk.h |
530b0eef593b
6422444 update inquiry.h to reflect latest spc-3 device types
taylor
parents:
1991
diff
changeset
|
6307 |
rm -f $root/usr/include/sys/dktp/scdkwatch.h |
530b0eef593b
6422444 update inquiry.h to reflect latest spc-3 device types
taylor
parents:
1991
diff
changeset
|
6308 |
rm -f $root/usr/include/sys/dktp/sctarget.h |
530b0eef593b
6422444 update inquiry.h to reflect latest spc-3 device types
taylor
parents:
1991
diff
changeset
|
6309 |
rm -f $root/usr/include/sys/dktp/tgcd.h |
530b0eef593b
6422444 update inquiry.h to reflect latest spc-3 device types
taylor
parents:
1991
diff
changeset
|
6310 |
rm -f $root/usr/include/sys/dktp/tgpassthru.h |
0 | 6311 |
|
6312 |
# |
|
6313 |
# Remove Floating Point Emulator for EOF as per PSARC/2003/651 |
|
6314 |
# |
|
6315 |
rm -f $root/platform/i86pc/kernel/misc/emul_80387 |
|
6316 |
||
6317 |
# |
|
6318 |
# Remove 64-bit adp, cadp and cpqhpc |
|
6319 |
# |
|
6320 |
rm -f $root/kernel/drv/amd64/adp |
|
6321 |
rm -f $root/kernel/drv/amd64/cadp |
|
6322 |
rm -f $root/kernel/drv/amd64/cpqhpc |
|
6323 |
||
6324 |
# |
|
6325 |
# Remove 64-bit i2o_bs, i2o_msg, i2o_scsi, pci_to_i2o, mscsi, ncrs, |
|
6326 |
# msm, spwr, bscv, bscbus |
|
6327 |
# |
|
6328 |
rm -f $root/kernel/drv/amd64/i2o_bs |
|
6329 |
rm -f $root/kernel/misc/amd64/i2o_msg |
|
6330 |
rm -f $root/kernel/drv/amd64/i2o_scsi |
|
6331 |
rm -f $root/kernel/drv/amd64/pci_to_i2o |
|
6332 |
rm -f $root/platform/i86pc/kernel/drv/amd64/mscsi |
|
6333 |
rm -f $root/kernel/drv/amd64/ncrs |
|
6334 |
rm -f $root/platform/i86pc/kernel/drv/amd64/msm |
|
6335 |
rm -f $root/kernel/drv/amd64/spwr |
|
6336 |
rm -f $root/platform/i86pc/kernel/drv/amd64/bscv |
|
6337 |
rm -f $root/platform/i86pc/kernel/drv/amd64/bscbus |
|
6338 |
||
2958 | 6339 |
# Remove obsolete pfil modules, binaries, and configuration files |
6340 |
rm -f $root/kernel/drv/pfil |
|
6341 |
rm -f $root/kernel/drv/pfil.conf |
|
6342 |
rm -f $root/kernel/drv/sparcv9/pfil |
|
6343 |
rm -f $root/kernel/drv/amd64/pfil |
|
3861 | 6344 |
rm -f $root/kernel/strmod/pfil |
6345 |
rm -f $root/kernel/strmod/sparcv9/pfil |
|
6346 |
rm -f $root/kernel/strmod/amd64/pfil |
|
2958 | 6347 |
rm -f $root/usr/sbin/pfild |
6348 |
||
0 | 6349 |
# Remove obsolete atomic_prim.h file. |
6350 |
rm -f $usr/include/v9/sys/atomic_prim.h |
|
6351 |
||
6352 |
# |
|
6353 |
# Remove sc_nct binary and the corresponding symlink to sc_nct from the |
|
6354 |
# Montecarlo platform specific directories (Reference: PSARC 2003/606). |
|
6355 |
# To be specific, the following binary will be removed. |
|
6356 |
# /platform/SUNW,UltraSPARC-IIe-NetraCT-40/kernel/drv/sparcv9/sc_nct |
|
6357 |
# Also, the following symlink will be removed. |
|
6358 |
# /platform/SUNW,UltraSPARC-IIe-NetraCT-60/kernel/drv/sparcv9/sc_nct |
|
6359 |
# |
|
6360 |
if [ -f $root/platform/SUNW,UltraSPARC-IIe-NetraCT-40/kernel/drv/sparcv9/sc_nct ]; then |
|
6361 |
rm -f $root/platform/SUNW,UltraSPARC-IIe-NetraCT-40/kernel/drv/sparcv9/sc_nct |
|
6362 |
rm -f $root/platform/SUNW,UltraSPARC-IIe-NetraCT-60/kernel/drv/sparcv9/sc_nct |
|
6363 |
fi |
|
6364 |
||
6365 |
# |
|
6366 |
# In case of bfu to an older release, remove traces of "new" |
|
6367 |
# Kerberos mechanisms. Kerberos libraries and paths are corrected |
|
6368 |
# after extraction is complete. |
|
6369 |
# |
|
6370 |
rm -f $root/kernel/misc/kgss/kmech_krb5 |
|
6371 |
rm -f $root/kernel/misc/kgss/sparcv9/kmech_krb5 |
|
6372 |
rm -f $root/platform/$karch/kernel/misc/kgss/sparcv9/kmech_krb5 |
|
6373 |
# |
|
6374 |
# Diskless clients have already extracted /usr so don't delete these |
|
6375 |
# Non-global zones never extracts /usr so don't delete these |
|
6376 |
# |
|
6377 |
if [ $diskless = no -a $zone = global ]; then |
|
6378 |
rm -f $usr/lib/gss/mech_krb5.so |
|
6379 |
rm -f $usr/lib/gss/mech_krb5.so.1 |
|
6380 |
rm -f $usr/lib/sparcv9/gss/mech_krb5.so |
|
6381 |
rm -f $usr/lib/sparcv9/gss/mech_krb5.so.1 |
|
6382 |
fi |
|
6383 |
||
6384 |
# Remove old OpenSSL stuff from SUNWwbint |
|
6385 |
rm -rf $usr/include/openssl |
|
6386 |
rm -rf $usr/lib/openssl |
|
6387 |
||
6388 |
#Remove ufs logging module - now merged into ufs module |
|
6389 |
rm -f $rootprefix/kernel/misc/ufs_log |
|
6390 |
rm -f $rootprefix/kernel/misc/sparcv9/ufs_log |
|
6391 |
||
1619
b29a07d0220d
6221730 ufs_log mdb module needs to be merged with the ufs one
sjelinek
parents:
1545
diff
changeset
|
6392 |
#Remove ufs_log mdb/kmdb modules - now merged in to ufs module |
b29a07d0220d
6221730 ufs_log mdb module needs to be merged with the ufs one
sjelinek
parents:
1545
diff
changeset
|
6393 |
rm -f $rootprefix/kernel/kmdb/ufs_log |
b29a07d0220d
6221730 ufs_log mdb module needs to be merged with the ufs one
sjelinek
parents:
1545
diff
changeset
|
6394 |
rm -f $rootprefix/kernel/kmdb/sparcv9/ufs_log |
b29a07d0220d
6221730 ufs_log mdb module needs to be merged with the ufs one
sjelinek
parents:
1545
diff
changeset
|
6395 |
rm -f $rootprefix/kernel/kmdb/amd64/ufs_log |
b29a07d0220d
6221730 ufs_log mdb module needs to be merged with the ufs one
sjelinek
parents:
1545
diff
changeset
|
6396 |
rm -f $rootprefix/usr/lib/mdb/kvm/ufs_log.so |
b29a07d0220d
6221730 ufs_log mdb module needs to be merged with the ufs one
sjelinek
parents:
1545
diff
changeset
|
6397 |
rm -f $rootprefix/usr/lib/mdb/kvm/sparcv9/ufs_log.so |
b29a07d0220d
6221730 ufs_log mdb module needs to be merged with the ufs one
sjelinek
parents:
1545
diff
changeset
|
6398 |
rm -f $rootprefix/usr/lib/mdb/kvm/amd64/ufs_log.so |
b29a07d0220d
6221730 ufs_log mdb module needs to be merged with the ufs one
sjelinek
parents:
1545
diff
changeset
|
6399 |
|
0 | 6400 |
#Remove diskmgtd. If backward BFU, will get re-installed from |
6401 |
#archive. |
|
6402 |
rm -f $usr/lib/diskmgtd |
|
6403 |
||
6404 |
# |
|
6405 |
# Remove old ia64 cruft |
|
6406 |
# |
|
6407 |
if [ $target_isa = i386 ]; then |
|
6408 |
rm -f $usr/include/sys/ia64_archext.h |
|
6409 |
rm -f $usr/include/sys/sysia64.h |
|
6410 |
rm -rf $usr/include/ia64 |
|
6411 |
fi |
|
6412 |
||
6413 |
# |
|
6414 |
# Remove machpage-related stuff |
|
6415 |
# |
|
6416 |
rm -f $usr/platform/*/include/vm/mach_page.h |
|
6417 |
rm -f $usr/lib/adb/machpp |
|
6418 |
||
6419 |
# |
|
6420 |
# Remove old cacheos |
|
6421 |
# |
|
6422 |
rm -f $root/etc/init.d/cacheos |
|
6423 |
rm -f $root/etc/init.d/cacheos.finish |
|
6424 |
rm -f $root/etc/init.d/cachefs.root |
|
6425 |
rm -f $root/etc/rcS.d/S35cacheos.sh |
|
6426 |
rm -f $root/etc/rc2.d/S93cacheos.finish |
|
6427 |
rm -f $root/etc/rcS.d/S41cachefs.root |
|
6428 |
||
6429 |
# |
|
6430 |
# Remove unneeded nfsmapid entries |
|
6431 |
# |
|
6432 |
nfsmapid_cfg |
|
6433 |
||
6434 |
# |
|
2385
95b548983d15
6448220 bfu command causes nfs/auth.h file missing if the system has zone
rmesta
parents:
2364
diff
changeset
|
6435 |
# Nuke the nfsauth headers when we're working with the 'global' |
3948
b8d304c37bf9
6535942 bfu and acr don't tolerate non-native zones other than 'lx'
dp
parents:
3893
diff
changeset
|
6436 |
# or a fully populated nonglobal zone. The cpio archive will lay the |
2385
95b548983d15
6448220 bfu command causes nfs/auth.h file missing if the system has zone
rmesta
parents:
2364
diff
changeset
|
6437 |
# right one to match mountd(1m)'s comm method w/the kernel (via |
95b548983d15
6448220 bfu command causes nfs/auth.h file missing if the system has zone
rmesta
parents:
2364
diff
changeset
|
6438 |
# kRPC or Doors/XDR). |
95b548983d15
6448220 bfu command causes nfs/auth.h file missing if the system has zone
rmesta
parents:
2364
diff
changeset
|
6439 |
# |
95b548983d15
6448220 bfu command causes nfs/auth.h file missing if the system has zone
rmesta
parents:
2364
diff
changeset
|
6440 |
dir_is_inherited usr 2>/dev/null; |
95b548983d15
6448220 bfu command causes nfs/auth.h file missing if the system has zone
rmesta
parents:
2364
diff
changeset
|
6441 |
if [ $? = 1 -o $zone = global ]; then |
95b548983d15
6448220 bfu command causes nfs/auth.h file missing if the system has zone
rmesta
parents:
2364
diff
changeset
|
6442 |
rm -f ${rootprefix}/usr/include/rpcsvc/nfsauth_prot.x |
95b548983d15
6448220 bfu command causes nfs/auth.h file missing if the system has zone
rmesta
parents:
2364
diff
changeset
|
6443 |
rm -f ${rootprefix}/usr/include/rpcsvc/nfsauth_prot.h |
95b548983d15
6448220 bfu command causes nfs/auth.h file missing if the system has zone
rmesta
parents:
2364
diff
changeset
|
6444 |
rm -f ${rootprefix}/usr/include/nfs/auth.h |
95b548983d15
6448220 bfu command causes nfs/auth.h file missing if the system has zone
rmesta
parents:
2364
diff
changeset
|
6445 |
fi |
2315
9b2a16330ba6
6445209 snv_43 build servers fail to build ON (rpcbind should no longer include nfsauth_prot.h)
rmesta
parents:
2311
diff
changeset
|
6446 |
|
9b2a16330ba6
6445209 snv_43 build servers fail to build ON (rpcbind should no longer include nfsauth_prot.h)
rmesta
parents:
2311
diff
changeset
|
6447 |
# |
0 | 6448 |
# Move the original manifests aside; later we will restore |
6449 |
# unchanged originals to avoid superfluous re-import on reboot. |
|
6450 |
# (First blow away the old dir path just to be safe.) |
|
6451 |
# |
|
6452 |
rm -rf $root/$old_mfst_dir |
|
6453 |
[ -d $root/$new_mfst_dir ] && mv $root/$new_mfst_dir $root/$old_mfst_dir |
|
6454 |
||
6455 |
# |
|
6456 |
# Remove obsolete sum.h |
|
6457 |
# |
|
6458 |
rm -f $usr/include/sum.h |
|
6459 |
||
6460 |
# |
|
6461 |
# Remove obsolete std.h |
|
6462 |
# |
|
6463 |
rm -f $usr/include/std.h |
|
6464 |
||
6465 |
# |
|
132 | 6466 |
# Remove obsolete rpc/trace.h |
6467 |
# |
|
6468 |
rm -f $usr/include/rpc/trace.h |
|
6469 |
||
6470 |
# |
|
0 | 6471 |
# Remove acpi_intp module |
6472 |
# |
|
6473 |
if [ $target_isa = i386 ]; then |
|
6474 |
rm -f $root/kernel/misc/acpi_intp |
|
6475 |
rm -f $root/kernel/misc/amd64/acpi_intp |
|
6476 |
fi |
|
6477 |
||
461
7f48ccb9d9a6
PSARC/2005/378 Obsolete and/or removal of disparaged librac
robinson
parents:
305
diff
changeset
|
6478 |
# |
7f48ccb9d9a6
PSARC/2005/378 Obsolete and/or removal of disparaged librac
robinson
parents:
305
diff
changeset
|
6479 |
# Remove obsolete librac |
7f48ccb9d9a6
PSARC/2005/378 Obsolete and/or removal of disparaged librac
robinson
parents:
305
diff
changeset
|
6480 |
# |
7f48ccb9d9a6
PSARC/2005/378 Obsolete and/or removal of disparaged librac
robinson
parents:
305
diff
changeset
|
6481 |
rm -f $usr/include/rpc/rac.h |
7f48ccb9d9a6
PSARC/2005/378 Obsolete and/or removal of disparaged librac
robinson
parents:
305
diff
changeset
|
6482 |
rm -f $usr/lib/llib-lrac |
7f48ccb9d9a6
PSARC/2005/378 Obsolete and/or removal of disparaged librac
robinson
parents:
305
diff
changeset
|
6483 |
rm -f $usr/lib/llib-lrac.ln |
7f48ccb9d9a6
PSARC/2005/378 Obsolete and/or removal of disparaged librac
robinson
parents:
305
diff
changeset
|
6484 |
rm -f $usr/lib/amd64/llib-lrac.ln |
7f48ccb9d9a6
PSARC/2005/378 Obsolete and/or removal of disparaged librac
robinson
parents:
305
diff
changeset
|
6485 |
rm -f $usr/lib/sparcv9/llib-lrac.ln |
7f48ccb9d9a6
PSARC/2005/378 Obsolete and/or removal of disparaged librac
robinson
parents:
305
diff
changeset
|
6486 |
rm -f $usr/lib/librac.so |
7f48ccb9d9a6
PSARC/2005/378 Obsolete and/or removal of disparaged librac
robinson
parents:
305
diff
changeset
|
6487 |
rm -f $usr/lib/librac.so.1 |
7f48ccb9d9a6
PSARC/2005/378 Obsolete and/or removal of disparaged librac
robinson
parents:
305
diff
changeset
|
6488 |
rm -f $usr/lib/amd64/librac.so |
7f48ccb9d9a6
PSARC/2005/378 Obsolete and/or removal of disparaged librac
robinson
parents:
305
diff
changeset
|
6489 |
rm -f $usr/lib/amd64/librac.so.1 |
7f48ccb9d9a6
PSARC/2005/378 Obsolete and/or removal of disparaged librac
robinson
parents:
305
diff
changeset
|
6490 |
rm -f $usr/lib/sparcv9/librac.so |
7f48ccb9d9a6
PSARC/2005/378 Obsolete and/or removal of disparaged librac
robinson
parents:
305
diff
changeset
|
6491 |
rm -f $usr/lib/sparcv9/librac.so.1 |
7f48ccb9d9a6
PSARC/2005/378 Obsolete and/or removal of disparaged librac
robinson
parents:
305
diff
changeset
|
6492 |
|
2311 | 6493 |
# |
6494 |
# Remove /kernel/mac. This directory was introduced by |
|
6495 |
# PSARC/2006/248, and along with this came a syntax change to the |
|
6496 |
# /etc/aggregation.conf file. After archives have been extracted, |
|
6497 |
# we check for the existance of the /kernel/mac directory to see if |
|
6498 |
# we're doing a backward bfu and need to convert the syntax of the |
|
6499 |
# /etc/aggregation.conf file to its old format. |
|
6500 |
# |
|
6501 |
if [ -d $root/kernel/mac ]; then |
|
6502 |
from_new_aggrconf=1 |
|
2479
8a306e868728
6453157 missing initialization of from_new_aggrconf variable in bfu.sh
seb
parents:
2385
diff
changeset
|
6503 |
rm -rf $root/kernel/mac |
8a306e868728
6453157 missing initialization of from_new_aggrconf variable in bfu.sh
seb
parents:
2385
diff
changeset
|
6504 |
else |
8a306e868728
6453157 missing initialization of from_new_aggrconf variable in bfu.sh
seb
parents:
2385
diff
changeset
|
6505 |
from_new_aggrconf=0 |
2311 | 6506 |
fi |
6507 |
||
2923 | 6508 |
# Remove libcmd from $root/lib. It has moved back to $usr/lib. |
6509 |
rm -f $root/lib/libcmd.so |
|
6510 |
rm -f $root/lib/libcmd.so.1 |
|
6511 |
rm -f $root/lib/amd64/libcmd.so |
|
6512 |
rm -f $root/lib/amd64/libcmd.so.1 |
|
6513 |
rm -f $root/lib/sparcv9/libcmd.so |
|
6514 |
rm -f $root/lib/sparcv9/libcmd.so.1 |
|
6515 |
rm -f $root/lib/llib-lcmd |
|
6516 |
rm -f $root/lib/llib-lcmd.ln |
|
6517 |
rm -f $root/lib/amd64/llib-lcmd.ln |
|
6518 |
rm -f $root/lib/sparcv9/llib-lcmd.ln |
|
6519 |
||
3148
9998f6336457
6448219 bsmrecord(1M)'s audit_record_attr database doesn't belong in /etc
tz204579
parents:
3147
diff
changeset
|
6520 |
# Remove audit_record_attr. Moved to /usr/lib/security |
9998f6336457
6448219 bsmrecord(1M)'s audit_record_attr database doesn't belong in /etc
tz204579
parents:
3147
diff
changeset
|
6521 |
rm -f $root/etc/security/audit_record_attr |
9998f6336457
6448219 bsmrecord(1M)'s audit_record_attr database doesn't belong in /etc
tz204579
parents:
3147
diff
changeset
|
6522 |
|
3445 | 6523 |
# |
6524 |
# Remove xmemfs altogether. |
|
6525 |
# |
|
6526 |
rm -f $usr/include/sys/fs/xmem.h |
|
6527 |
rm -f $usr/include/sys/fs/seg_xmem.h |
|
6528 |
rm -f $usr/kernel/fs/xmemfs |
|
6529 |
rm -f $usr/kernel/fs/amd64/xmemfs |
|
6530 |
rm -rf $usr/lib/fs/xmemfs |
|
6531 |
||
3871 | 6532 |
# |
6533 |
# Remove obsolete libmacadm, liblaadm and libwladm. If this is |
|
6534 |
# a backwards BFU, they will be extracted by cpio. |
|
6535 |
# |
|
6536 |
rm -f $root/lib/libmacadm.so.1 |
|
6537 |
rm -f $root/lib/liblaadm.so.1 |
|
6538 |
rm -f $root/lib/libwladm.so.1 |
|
6539 |
||
3893
4115db3e65ea
6518531 BFU Script should cleanup old PCI hotplug devlinks
scarter
parents:
3871
diff
changeset
|
6540 |
# |
4115db3e65ea
6518531 BFU Script should cleanup old PCI hotplug devlinks
scarter
parents:
3871
diff
changeset
|
6541 |
# Remove PCI hotplug devlinks. Their format has changed, |
4115db3e65ea
6518531 BFU Script should cleanup old PCI hotplug devlinks
scarter
parents:
3871
diff
changeset
|
6542 |
# and the old devlinks will interfere with the new ones. |
4115db3e65ea
6518531 BFU Script should cleanup old PCI hotplug devlinks
scarter
parents:
3871
diff
changeset
|
6543 |
# |
4115db3e65ea
6518531 BFU Script should cleanup old PCI hotplug devlinks
scarter
parents:
3871
diff
changeset
|
6544 |
rm -f $root/dev/cfg/*pci* |
4115db3e65ea
6518531 BFU Script should cleanup old PCI hotplug devlinks
scarter
parents:
3871
diff
changeset
|
6545 |
|
0 | 6546 |
# End of pre-archive extraction hacks. |
6547 |
||
6548 |
if [ $diskless = no -a $zone = global ]; then |
|
6549 |
print "Extracting ufs modules for boot block ... \c" | \ |
|
6550 |
tee -a $EXTRACT_LOG |
|
6551 |
do_extraction $cpiodir/$karch.usr$ZFIX \ |
|
6552 |
'usr/platform/'$karch'/lib/fs/ufs/*' | \ |
|
6553 |
tee -a $EXTRACT_LOG |
|
6554 |
case $target_isa in |
|
6555 |
sparc) |
|
6556 |
if [[ "$rootslice" = /dev/rdsk/* ]]; then |
|
6557 |
print "Installing boot block on $rootslice." |
|
6558 |
cd $usr/platform/$karch/lib/fs/ufs |
|
6559 |
installboot ./bootblk $rootslice |
|
6560 |
fi |
|
6561 |
;; |
|
6562 |
i386) |
|
6563 |
;; |
|
6564 |
*) |
|
6565 |
;; # unknown ISA |
|
6566 |
esac |
|
6567 |
fi |
|
6568 |
||
6569 |
if [ $diskless = yes ]; then |
|
6570 |
node=${root##*/} |
|
6571 |
archlist="" |
|
6572 |
for arch in $allarchs |
|
6573 |
do |
|
6574 |
egrep -s '/export/exec/.*'$arch'/usr/kvm' \ |
|
6575 |
$root/etc/vfstab || |
|
6576 |
test -d $root/platform/$arch && |
|
6577 |
archlist="$archlist $arch" |
|
6578 |
done |
|
6579 |
if [ -z "$old_style_archives" ]; then |
|
6580 |
extract_archives lib generic |
|
6581 |
extract_archives sbin generic |
|
6582 |
extract_archives kernel generic |
|
6583 |
fi |
|
6584 |
extract_archives root generic $archlist |
|
6585 |
if [ $target_isa = i386 ]; then |
|
6586 |
extract_boot_archives boot $archlist |
|
6587 |
fi |
|
6588 |
else |
|
6589 |
export PATH=/tmp/bfubin |
|
6590 |
node=`uname -n` |
|
6591 |
if [ $zone = global ]; then |
|
6592 |
extract_archives usr generic $usrarchs |
|
6593 |
if [ -z "$old_style_archives" ]; then |
|
6594 |
extract_archives lib generic |
|
6595 |
extract_archives sbin generic |
|
6596 |
extract_archives kernel generic |
|
6597 |
fi |
|
6598 |
extract_archives root generic $rootarchs |
|
6599 |
if [ $target_isa = i386 ]; then |
|
6600 |
# |
|
6601 |
# The assumption here is that if boot |
|
6602 |
# archives exist at all, they only exist |
|
6603 |
# for architectures where we also have |
|
6604 |
# .root archives. |
|
6605 |
# |
|
6606 |
extract_boot_archives boot $rootarchs |
|
6607 |
fi |
|
6608 |
else |
|
1872 | 6609 |
dir_is_inherited usr || |
6610 |
extract_archives usr generic $usrarchs |
|
6611 |
dir_is_inherited lib || |
|
6612 |
extract_archives lib generic |
|
6613 |
dir_is_inherited sbin || |
|
6614 |
extract_archives sbin generic |
|
6615 |
dir_is_inherited platform && |
|
6616 |
extract_archives root generic || |
|
6617 |
extract_archives root generic $rootarchs |
|
0 | 6618 |
fi |
6619 |
fi |
|
6620 |
||
6621 |
touch reconfigure |
|
6622 |
||
6623 |
# |
|
6624 |
# UltraSparc III platforms have aes module in platform directory |
|
6625 |
# |
|
6626 |
if [ ! -f $root/platform/$plat/kernel/crypto/sparcv9/aes ]; then |
|
6627 |
rm -f $root/platform/sun4u-us3/kernel/crypto/sparcv9/aes |
|
6628 |
rm -f $root/platform/sun4u-us3/kernel/crypto/sparcv9/aes256 |
|
6629 |
fi |
|
6630 |
||
6631 |
if [ $zone = global ]; then |
|
6632 |
print "\nRemoving duplicate kernel binaries ..." |
|
6633 |
# |
|
6634 |
# First, find all regular files underneath the */kernel |
|
6635 |
# directories we extracted, and mark them as older or newer |
|
6636 |
# than our reference file -- if newer, they were extracted |
|
6637 |
# during the bfu. |
|
6638 |
# |
|
6639 |
# We then split out the pre-/kernel part from the post-/kernel |
|
6640 |
# part, sort by post-/kernel part and age (new first), and |
|
6641 |
# delete old files which have new counterparts. |
|
6642 |
# |
|
6643 |
dirs="$rootprefix/kernel $usr/kernel" |
|
6644 |
for plat in $archlist $rootarchs $usrarchs; do |
|
6645 |
dir=$rootprefix/platform/$plat/kernel |
|
6646 |
[[ -d $dir ]] && dirs="$dirs $dir" |
|
6647 |
done |
|
6648 |
||
6649 |
age=new |
|
6650 |
ls -ct $time_ref `find $dirs -type f 2>/dev/null` | uniq | |
|
6651 |
while read f; do |
|
6652 |
if [[ $f = $time_ref ]] then |
|
6653 |
age=old |
|
6654 |
else |
|
6655 |
echo $age $f |
|
6656 |
fi |
|
6657 |
done | |
|
6658 |
sed 's@\(.*/kernel\)/@\1 @' | sort -k 3 -k 1 | nawk ' |
|
6659 |
/^new/ { lastname = $3 } |
|
6660 |
/^old/ { if (lastname == $3) { print $2 "/" $3 } } |
|
6661 |
' | while read x; do |
|
6662 |
echo rm $x |
|
6663 |
rm $x |
|
6664 |
done |
|
6665 |
fi |
|
6666 |
||
6667 |
echo |
|
6668 |
# Simulate installation of SUNWcry* - these are in the bfu archives. |
|
6669 |
if [ -f $rootprefix/etc/crypto/kcf.conf -a \ |
|
6670 |
-f $rootprefix/etc/crypto/pkcs11.conf ]; then |
|
6671 |
enable_crypto_unlimited |
|
6672 |
fi |
|
6673 |
||
6674 |
# Add uCF's metaslot feature |
|
6675 |
if [ -f $rootprefix/etc/crypto/pkcs11.conf ] ; then |
|
6676 |
enable_crypto_metaslot |
|
6677 |
fi |
|
6678 |
||
6679 |
# Cleanup old Kerberos mechanisms |
|
6680 |
cleanup_kerberos_mechanisms |
|
6681 |
||
305 | 6682 |
# Fix network datalink configuration |
6683 |
if [ $zone = global -a $need_datalink = yes ]; then |
|
6684 |
create_datalink_conf |
|
6685 |
fi |
|
6686 |
||
0 | 6687 |
print "\nRestoring configuration files.\n" |
6688 |
||
6689 |
cd $root |
|
6690 |
rm -rf bfu.ancestor |
|
6691 |
test -d bfu.parent && mv bfu.parent bfu.ancestor |
|
6692 |
mkdir bfu.parent |
|
6693 |
print "Restoring configuration files ... \c" >> $EXTRACT_LOG |
|
6694 |
filelist $zone | cpio -pdmu bfu.parent 2>>$EXTRACT_LOG || \ |
|
6695 |
extraction_error "restoring configuration files" |
|
3446 | 6696 |
if [ $multi_or_direct = no ]; then |
0 | 6697 |
if [ $have_realmode = yes ]; then |
6698 |
if [ -d bfu.realmode ]; then |
|
6699 |
( cd bfu.realmode ; realmode_filelist | \ |
|
6700 |
cpio -pdmu ../bfu.ancestor 2>/dev/null ) |
|
6701 |
rm -rf bfu.realmode |
|
6702 |
fi |
|
6703 |
mkdir bfu.realmode |
|
6704 |
( cd bfu.parent ; realmode_filelist | \ |
|
6705 |
cpio -pdmu ../bfu.realmode 2>/dev/null ) |
|
6706 |
else |
|
6707 |
for file in $realmode_files |
|
6708 |
do |
|
6709 |
rm -rf bfu.parent/$file |
|
6710 |
done |
|
6711 |
fi |
|
6712 |
fi |
|
1872 | 6713 |
|
0 | 6714 |
cd bfu.child |
6715 |
for file in `filelist $zone` |
|
6716 |
do |
|
6717 |
# parent: freshly-BFUed version |
|
6718 |
# child: pre-BFU version |
|
6719 |
# ancestor: installed from archives the last time you BFUed |
|
6720 |
# actual: in the root filesystem at this moment (same as parent) |
|
6721 |
||
6722 |
parent=$rootprefix/bfu.parent/$file |
|
6723 |
child=$rootprefix/bfu.child/$file |
|
6724 |
ancestor=$rootprefix/bfu.ancestor/$file |
|
6725 |
conflicts=$rootprefix/bfu.conflicts/$file |
|
6726 |
actual=$rootprefix/$file |
|
6727 |
||
6728 |
# if a superfluous-to-local-zones file was blown away, skip it |
|
6729 |
[ -f $actual ] || continue |
|
6730 |
||
6731 |
# if there's been no change by the BFU, skip it |
|
6732 |
cmp -s $child $actual && continue |
|
6733 |
||
6734 |
# if the file was not installed by the BFU, skip it |
|
6735 |
[ -f $parent ] || continue |
|
6736 |
||
6737 |
# if this is a file which should never be updated by BFU, |
|
6738 |
# preserve the original (child) version |
|
6739 |
if (echo $preserve_files | grep $file >/dev/null 2>&1) |
|
6740 |
then |
|
6741 |
print " preserve: $file" |
|
6742 |
cp -p $child $actual |
|
6743 |
continue |
|
6744 |
fi |
|
6745 |
||
6746 |
# if the file was accepted from the parent on the last BFU, |
|
6747 |
# then accept it again this time without argument. Or, if |
|
6748 |
# this is the first bfu after an standard Solaris install |
|
6749 |
# or upgrade, compare the file to one installed from packages. |
|
6750 |
# If it hasn't been modified since installation, accept |
|
6751 |
# the file from the parent. |
|
6752 |
if [ -f $ancestor ] ; then |
|
6753 |
if cmp -s $child $ancestor; then |
|
6754 |
print " update: $file" |
|
6755 |
continue |
|
6756 |
fi |
|
6757 |
elif [ "$firstbfu" = "yes" ] ; then |
|
6758 |
installedsum=$(grep "^/$file " \ |
|
6759 |
$rootprefix/var/sadm/install/contents | |
|
6760 |
awk '{ print $8 }') |
|
6761 |
if [ -n "$installedsum" ] ; then |
|
6762 |
actualsum=`sum $child | sed 's/ .*//'` |
|
6763 |
if [ "$installedsum" -eq "$actualsum" ] ; then |
|
6764 |
print " update: $file" |
|
6765 |
continue |
|
6766 |
fi |
|
6767 |
fi |
|
6768 |
fi |
|
6769 |
||
6770 |
# if the BFU'ed file is the same as the beginning of the |
|
6771 |
# pre-BFUed file, assume the user has added lines to the |
|
6772 |
# end, and restore the pre-BFUed version |
|
6773 |
if (cmp $child $parent 2>&1) | egrep -s 'EOF on '$parent; then |
|
6774 |
print " restore: $file" |
|
6775 |
cp -p $child $actual |
|
6776 |
continue |
|
6777 |
fi |
|
6778 |
||
6779 |
# if the new version is the same as it was the last time |
|
6780 |
# BFU was run, but still different than the pre-BFU version, |
|
6781 |
# this is an "old" conflict; otherwise, it's a "NEW" |
|
6782 |
# conflict. Old conflicts can usually be safely ignored. |
|
6783 |
if cmp -s $parent $ancestor; then |
|
6784 |
print "old \c" |
|
6785 |
else |
|
6786 |
print "NEW \c" |
|
6787 |
print $file >>$rootprefix/bfu.conflicts/NEW |
|
6788 |
fi |
|
6789 |
print "conflict: $file" |
|
6790 |
(cd $root; print $file | cpio -pdmu bfu.conflicts 2>/dev/null) |
|
6791 |
||
6792 |
# for all conflicts, restore the pre-BFU version and let |
|
6793 |
# the user decide what to do. |
|
6794 |
cp -p $child $actual |
|
6795 |
done |
|
6796 |
||
6797 |
if [ $zone = global ]; then |
|
6798 |
# |
|
6799 |
# correct permissions using /etc/minor_perm from the parent and |
|
6800 |
# child, prefer parent. |
|
6801 |
# |
|
6802 |
mperm=$rootprefix/etc/minor_perm |
|
6803 |
pmperm=$rootprefix/bfu.parent/etc/minor_perm |
|
6804 |
if [ -f $pmperm ] |
|
6805 |
then |
|
6806 |
mperm="$pmperm $mperm" |
|
6807 |
fi |
|
6808 |
||
6809 |
# |
|
6810 |
# Devices with changed permissions should be added here much |
|
6811 |
# like in i.minorperm. The "ssm" devices are special in that |
|
6812 |
# they have no /dev links associated with them. |
|
6813 |
# |
|
6814 |
while read minor dev |
|
6815 |
do ( |
|
6816 |
set -- `fgrep -h "$minor" $mperm` ""; |
|
6817 |
if [ ! -z "$2" ] |
|
6818 |
then |
|
6819 |
chmod $2 $rootprefix/dev/$dev 2>/dev/null |
|
6820 |
chown $3:$4 $rootprefix/dev/$dev 2>/dev/null |
|
6821 |
fi |
|
6822 |
) done <<-EOF |
|
6823 |
ssm:* ../devices/ssm*:* |
|
6824 |
cpc:shared ../devices/pseudo/cpc* |
|
6825 |
icmp:icmp icmp |
|
6826 |
icmp6:icmp6 icmp6 |
|
6827 |
ip:ip ip |
|
6828 |
ip6:ip6 ip6 |
|
6829 |
rts:rts rts |
|
6830 |
keysock:keysock keysock |
|
6831 |
ipsecah:ipsecah ipsecah |
|
6832 |
ipsecesp:ipsecesp ipsecesp |
|
6833 |
spdsock:spdsock spdsock |
|
6834 |
sad:admin sad/admin |
|
6835 |
fssnap:ctl fssnapctl |
|
6836 |
fssnap:* fssnap/* |
|
6837 |
clone:ce ce |
|
6838 |
clone:eri eri |
|
6839 |
clone:ge ge |
|
6840 |
clone:hme hme |
|
6841 |
clone:le le |
|
6842 |
clone:qfe qfe |
|
6843 |
clone:bge bge |
|
6844 |
bge:* bge* |
|
6845 |
clone:dmfe dmfe |
|
6846 |
dmfe:* dmfe* |
|
6847 |
clone:pcelx pcelx |
|
6848 |
pcelx:* pcelx* |
|
6849 |
clone:dnet dnet |
|
6850 |
dnet:* dnet* |
|
6851 |
clone:elxl elxl |
|
6852 |
elxl:* elxl* |
|
6853 |
clone:iprb iprb |
|
6854 |
iprb:* iprb* |
|
6855 |
clone:spwr spwr |
|
6856 |
spwr:* spwr* |
|
6857 |
EOF |
|
6858 |
||
6859 |
if [ $target_isa = i386 ] && [[ $rootslice = /dev/rdsk/* || \ |
|
6860 |
$rootslice = /dev/md/rdsk/* ]]; then |
|
3446 | 6861 |
check_boot_env |
0 | 6862 |
fi |
1422
ce4773037fb7
6379341 zones in /etc/zones/index has non-unique UUID
carlsonj
parents:
1414
diff
changeset
|
6863 |
|
ce4773037fb7
6379341 zones in /etc/zones/index has non-unique UUID
carlsonj
parents:
1414
diff
changeset
|
6864 |
# Check for damage due to CR 6379341. This was actually fixed |
ce4773037fb7
6379341 zones in /etc/zones/index has non-unique UUID
carlsonj
parents:
1414
diff
changeset
|
6865 |
# back in snv_24, but users BFUing from an S10 build up to |
ce4773037fb7
6379341 zones in /etc/zones/index has non-unique UUID
carlsonj
parents:
1414
diff
changeset
|
6866 |
# Nevada can still encounter it. |
ce4773037fb7
6379341 zones in /etc/zones/index has non-unique UUID
carlsonj
parents:
1414
diff
changeset
|
6867 |
rzi=$root/etc/zones/index |
ce4773037fb7
6379341 zones in /etc/zones/index has non-unique UUID
carlsonj
parents:
1414
diff
changeset
|
6868 |
if [ -f $rzi ]; then |
ce4773037fb7
6379341 zones in /etc/zones/index has non-unique UUID
carlsonj
parents:
1414
diff
changeset
|
6869 |
# Look for duplicated UUIDs. If there are any, then |
ce4773037fb7
6379341 zones in /etc/zones/index has non-unique UUID
carlsonj
parents:
1414
diff
changeset
|
6870 |
# just wipe them out. |
ce4773037fb7
6379341 zones in /etc/zones/index has non-unique UUID
carlsonj
parents:
1414
diff
changeset
|
6871 |
if nawk -F: ' |
ce4773037fb7
6379341 zones in /etc/zones/index has non-unique UUID
carlsonj
parents:
1414
diff
changeset
|
6872 |
/^\#/ || NF != 4 { print $0; next; } |
ce4773037fb7
6379341 zones in /etc/zones/index has non-unique UUID
carlsonj
parents:
1414
diff
changeset
|
6873 |
{ |
ce4773037fb7
6379341 zones in /etc/zones/index has non-unique UUID
carlsonj
parents:
1414
diff
changeset
|
6874 |
if (flags[$4]) |
ce4773037fb7
6379341 zones in /etc/zones/index has non-unique UUID
carlsonj
parents:
1414
diff
changeset
|
6875 |
sub(/:[-0-9a-z]*$/,":"); |
ce4773037fb7
6379341 zones in /etc/zones/index has non-unique UUID
carlsonj
parents:
1414
diff
changeset
|
6876 |
print $0; |
ce4773037fb7
6379341 zones in /etc/zones/index has non-unique UUID
carlsonj
parents:
1414
diff
changeset
|
6877 |
flags[$4]=1; |
ce4773037fb7
6379341 zones in /etc/zones/index has non-unique UUID
carlsonj
parents:
1414
diff
changeset
|
6878 |
} |
ce4773037fb7
6379341 zones in /etc/zones/index has non-unique UUID
carlsonj
parents:
1414
diff
changeset
|
6879 |
' < $rzi > ${rzi}.bfu.$$; then |
ce4773037fb7
6379341 zones in /etc/zones/index has non-unique UUID
carlsonj
parents:
1414
diff
changeset
|
6880 |
if cmp -s $rzi ${rzi}.bfu.$$; then |
ce4773037fb7
6379341 zones in /etc/zones/index has non-unique UUID
carlsonj
parents:
1414
diff
changeset
|
6881 |
rm -f ${rzi}.bfu.$$ |
ce4773037fb7
6379341 zones in /etc/zones/index has non-unique UUID
carlsonj
parents:
1414
diff
changeset
|
6882 |
else |
ce4773037fb7
6379341 zones in /etc/zones/index has non-unique UUID
carlsonj
parents:
1414
diff
changeset
|
6883 |
chown root:sys ${rzi}.bfu.$$ |
ce4773037fb7
6379341 zones in /etc/zones/index has non-unique UUID
carlsonj
parents:
1414
diff
changeset
|
6884 |
chmod 644 ${rzi}.bfu.$$ |
ce4773037fb7
6379341 zones in /etc/zones/index has non-unique UUID
carlsonj
parents:
1414
diff
changeset
|
6885 |
mv ${rzi}.bfu.$$ $rzi |
ce4773037fb7
6379341 zones in /etc/zones/index has non-unique UUID
carlsonj
parents:
1414
diff
changeset
|
6886 |
fi |
ce4773037fb7
6379341 zones in /etc/zones/index has non-unique UUID
carlsonj
parents:
1414
diff
changeset
|
6887 |
else |
ce4773037fb7
6379341 zones in /etc/zones/index has non-unique UUID
carlsonj
parents:
1414
diff
changeset
|
6888 |
rm -f ${rzi}.bfu.$$ |
ce4773037fb7
6379341 zones in /etc/zones/index has non-unique UUID
carlsonj
parents:
1414
diff
changeset
|
6889 |
fi |
ce4773037fb7
6379341 zones in /etc/zones/index has non-unique UUID
carlsonj
parents:
1414
diff
changeset
|
6890 |
fi |
3201 | 6891 |
|
6892 |
# Move existing /etc/aggregation.conf entries to |
|
6893 |
# /etc/dladm/aggregation.conf; or, if bfu'ing |
|
6894 |
# backwards, move aggregation.conf back to /etc |
|
6895 |
aggr_old=$rootprefix/etc/aggregation.conf |
|
6896 |
aggr_new=$rootprefix/etc/dladm/aggregation.conf |
|
6897 |
if [ $new_dladm = yes ]; then |
|
6898 |
if [ -f $aggr_old ]; then |
|
6899 |
# use cat instead of cp/mv to keep |
|
6900 |
# owner+group of dest |
|
6901 |
cat $aggr_old > $aggr_new |
|
6902 |
rm -f $aggr_old |
|
6903 |
fi |
|
6904 |
else |
|
6905 |
if [ -f $aggr_new ]; then |
|
6906 |
cp $aggr_new $aggr_old |
|
6907 |
chgrp sys $aggr_old |
|
6908 |
rm -rf $rootprefix/etc/dladm |
|
6909 |
fi |
|
6910 |
fi |
|
6911 |
fi |
|
0 | 6912 |
|
3217
24c2e767a02d
6494262 application using audit interface require file_dac_read or uid 0
gww
parents:
3201
diff
changeset
|
6913 |
# Fix up audit permissions |
24c2e767a02d
6494262 application using audit interface require file_dac_read or uid 0
gww
parents:
3201
diff
changeset
|
6914 |
fix_up_audit |
24c2e767a02d
6494262 application using audit interface require file_dac_read or uid 0
gww
parents:
3201
diff
changeset
|
6915 |
|
0 | 6916 |
print "\nFor each file in conflict, your version has been restored." |
6917 |
print "The new versions are under $rootprefix/bfu.conflicts." |
|
6918 |
print "\nMAKE SURE YOU RESOLVE ALL CONFLICTS BEFORE REBOOTING.\n" |
|
3446 | 6919 |
if [ $multi_or_direct = yes ]; then |
0 | 6920 |
print "To install resolved changes required for reboot in the boot" |
6921 |
print "archive, invoke 'bootadm update-archive${cr_args}'\n" |
|
6922 |
fi |
|
6923 |
||
6924 |
if [ $zone != global ]; then |
|
6925 |
print "Resolve conflicts in the global zone first. Many of" |
|
6926 |
print "the conflicts in non-global zones can be resolved by" |
|
6927 |
print "copying the corresponding file from the global zone.\n" |
|
6928 |
else |
|
6929 |
fixup_mpxio |
|
2311 | 6930 |
|
6931 |
# |
|
6932 |
# If we're bfuing backward across PSARC/2006/248, then |
|
6933 |
# revert the /etc/aggregation.conf to its old format. |
|
6934 |
# |
|
6935 |
if [ -f $rootprefix/etc/aggregation.conf -a \ |
|
2479
8a306e868728
6453157 missing initialization of from_new_aggrconf variable in bfu.sh
seb
parents:
2385
diff
changeset
|
6936 |
! -d $rootprefix/kernel/mac -a \ |
8a306e868728
6453157 missing initialization of from_new_aggrconf variable in bfu.sh
seb
parents:
2385
diff
changeset
|
6937 |
$from_new_aggrconf = 1 ]; then |
2311 | 6938 |
revert_aggregation_conf |
6939 |
fi |
|
0 | 6940 |
fi |
6941 |
||
6942 |
cd $root |
|
6943 |
||
6944 |
smf_apply_conf |
|
6945 |
||
6946 |
update_policy_conf |
|
6947 |
||
1872 | 6948 |
if [ $zone != global ]; then |
3948
b8d304c37bf9
6535942 bfu and acr don't tolerate non-native zones other than 'lx'
dp
parents:
3893
diff
changeset
|
6949 |
rm -rf $global_zone_only_files $superfluous_nonglobal_zone_files |
1872 | 6950 |
fi |
6951 |
||
0 | 6952 |
print "bfu'ed from $cpiodir on `date +%Y-%m-%d`" >>etc/motd |
6953 |
tail +`nawk '/bfu.ed from/ { x=NR }; END { print x+1 }' \ |
|
6954 |
etc/motd.old` etc/motd.old >> etc/motd |
|
6955 |
||
6956 |
# |
|
6957 |
# Hacks to work around minor annoyances and make life more pleasant. |
|
6958 |
# Part 2 of 2: post-archive-extraction stuff |
|
6959 |
# |
|
6960 |
||
6961 |
rm -f var/statmon/state # to prevent lockd/statd hangs |
|
6962 |
for f in etc/auto_* # to make autofs happy |
|
6963 |
do |
|
6964 |
file $f | grep executable >/dev/null || chmod -x $f |
|
6965 |
done |
|
6966 |
||
6967 |
epilogue=$rootprefix/bfu.epilogue |
|
6968 |
if [ -f $epilogue ]; then |
|
6969 |
print "Executing $epilogue" |
|
6970 |
$epilogue || print "WARNING: $epilogue failed with code $?" |
|
6971 |
fi |
|
6972 |
||
6973 |
((seconds = SECONDS)) |
|
6974 |
((min = seconds / 60)) |
|
6975 |
((sec = seconds % 60)) |
|
6976 |
||
6977 |
if [ $zone = global ]; then |
|
6978 |
target=$node |
|
6979 |
else |
|
6980 |
target=$zone |
|
6981 |
fi |
|
6982 |
printf "Upgrade of $target took ${min}:%02d.\n" $sec |
|
6983 |
||
6984 |
# |
|
6985 |
# Do logging in the background so that if the automounter is gone, |
|
6986 |
# bfu doesn't wedge at this point. |
|
6987 |
# |
|
6988 |
log=$GATE/public/bfu.log |
|
6989 |
(test -w $log && printf \ |
|
6990 |
"`date +%Y'%'m%d` $node `uname -rv` $karch $cpiodir ${min}:%02d\n" \ |
|
6991 |
$sec >>$log) & |
|
6992 |
} |
|
6993 |
||
6994 |
# |
|
6995 |
# make sure the time reference is older than anything extracted |
|
6996 |
# |
|
6997 |
test $time_ref_seconds -eq $SECONDS && sleep 1 |
|
6998 |
||
6999 |
test $diskless = yes && extract_archives usr generic $allarchs |
|
7000 |
||
7001 |
for root in $rootlist |
|
7002 |
do |
|
7003 |
mondo_loop $root global |
|
7004 |
lastroot=$root |
|
7005 |
done |
|
7006 |
||
3948
b8d304c37bf9
6535942 bfu and acr don't tolerate non-native zones other than 'lx'
dp
parents:
3893
diff
changeset
|
7007 |
if [ -s "$bfu_zone_list" ]; then |
b8d304c37bf9
6535942 bfu and acr don't tolerate non-native zones other than 'lx'
dp
parents:
3893
diff
changeset
|
7008 |
cat "$bfu_zone_list" | while read zone zonepath; do |
b8d304c37bf9
6535942 bfu and acr don't tolerate non-native zones other than 'lx'
dp
parents:
3893
diff
changeset
|
7009 |
print "\nNow for zone $zone..." |
b8d304c37bf9
6535942 bfu and acr don't tolerate non-native zones other than 'lx'
dp
parents:
3893
diff
changeset
|
7010 |
mondo_loop $zonepath/root $zone |
0 | 7011 |
done |
2364 | 7012 |
|
7013 |
# |
|
3948
b8d304c37bf9
6535942 bfu and acr don't tolerate non-native zones other than 'lx'
dp
parents:
3893
diff
changeset
|
7014 |
# Normally we would clean up $bfu_zone_list but instead we leave it |
b8d304c37bf9
6535942 bfu and acr don't tolerate non-native zones other than 'lx'
dp
parents:
3893
diff
changeset
|
7015 |
# behind for ACR to locate and use inside the BFU alternate reality. |
2364 | 7016 |
# |
0 | 7017 |
fi |
7018 |
||
7019 |
print "Turning off delayed i/o and syncing filesystems ..." |
|
7020 |
sync |
|
7021 |
fastfs -s $rootlist $usr |
|
7022 |
fastfs $rootlist $usr |
|
7023 |
sync |
|
7024 |
lockfs -f $rootlist $usr |
|
7025 |
||
7026 |
egrep -s "^error " $EXTRACT_LOG |
|
7027 |
if [ $? -eq 0 ]; then |
|
7028 |
print "\nWARNING: archive extraction errors occurred.\n" |
|
7029 |
print "See $EXTRACT_LOG for details.\n" |
|
7030 |
fi |
|
7031 |
||
7032 |
lastrootprefix=${lastroot%/} |
|
7033 |
||
7034 |
if [ -t 0 -a -t 1 -a -t 2 ]; then |
|
7035 |
print "\nEntering post-bfu protected environment (shell: ksh)." |
|
7036 |
print "Edit configuration files as necessary, then reboot.\n" |
|
7037 |
cd $lastrootprefix/bfu.conflicts |
|
7038 |
PS1='bfu# ' ksh -ip |
|
7039 |
fi |
|
7040 |
||
7041 |
print "Exiting post-bfu protected environment. To reenter, type:" |
|
598
62a3fdbde968
6327152 bfuing over the fix for 6324631 can cause BFU/acr failures
jwadams
parents:
461
diff
changeset
|
7042 |
print LD_NOAUXFLTR=1 LD_LIBRARY_PATH=/tmp/bfulib $ldlib64 PATH=/tmp/bfubin \ |
62a3fdbde968
6327152 bfuing over the fix for 6324631 can cause BFU/acr failures
jwadams
parents:
461
diff
changeset
|
7043 |
/tmp/bfubin/ksh |
0 | 7044 |
|
7045 |
exit 0 |