author | Dan Price <dp@eng.sun.com> |
Mon, 21 Apr 2008 14:19:31 -0700 | |
changeset 344 | 4c887185d780 |
parent 329 | f549eab0d7b7 |
child 371 | e4db4be79d2e |
permissions | -rwxr-xr-x |
97
9a488b15900f
Introduce a branded zone as a testing aid
Danek Duvall <danek.duvall@sun.com>
parents:
diff
changeset
|
1 |
#!/bin/ksh -p |
9a488b15900f
Introduce a branded zone as a testing aid
Danek Duvall <danek.duvall@sun.com>
parents:
diff
changeset
|
2 |
# |
9a488b15900f
Introduce a branded zone as a testing aid
Danek Duvall <danek.duvall@sun.com>
parents:
diff
changeset
|
3 |
# CDDL HEADER START |
9a488b15900f
Introduce a branded zone as a testing aid
Danek Duvall <danek.duvall@sun.com>
parents:
diff
changeset
|
4 |
# |
9a488b15900f
Introduce a branded zone as a testing aid
Danek Duvall <danek.duvall@sun.com>
parents:
diff
changeset
|
5 |
# The contents of this file are subject to the terms of the |
9a488b15900f
Introduce a branded zone as a testing aid
Danek Duvall <danek.duvall@sun.com>
parents:
diff
changeset
|
6 |
# Common Development and Distribution License (the "License"). |
9a488b15900f
Introduce a branded zone as a testing aid
Danek Duvall <danek.duvall@sun.com>
parents:
diff
changeset
|
7 |
# You may not use this file except in compliance with the License. |
9a488b15900f
Introduce a branded zone as a testing aid
Danek Duvall <danek.duvall@sun.com>
parents:
diff
changeset
|
8 |
# |
9a488b15900f
Introduce a branded zone as a testing aid
Danek Duvall <danek.duvall@sun.com>
parents:
diff
changeset
|
9 |
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE |
9a488b15900f
Introduce a branded zone as a testing aid
Danek Duvall <danek.duvall@sun.com>
parents:
diff
changeset
|
10 |
# or http://www.opensolaris.org/os/licensing. |
9a488b15900f
Introduce a branded zone as a testing aid
Danek Duvall <danek.duvall@sun.com>
parents:
diff
changeset
|
11 |
# See the License for the specific language governing permissions |
9a488b15900f
Introduce a branded zone as a testing aid
Danek Duvall <danek.duvall@sun.com>
parents:
diff
changeset
|
12 |
# and limitations under the License. |
9a488b15900f
Introduce a branded zone as a testing aid
Danek Duvall <danek.duvall@sun.com>
parents:
diff
changeset
|
13 |
# |
9a488b15900f
Introduce a branded zone as a testing aid
Danek Duvall <danek.duvall@sun.com>
parents:
diff
changeset
|
14 |
# When distributing Covered Code, include this CDDL HEADER in each |
9a488b15900f
Introduce a branded zone as a testing aid
Danek Duvall <danek.duvall@sun.com>
parents:
diff
changeset
|
15 |
# file and include the License file at usr/src/OPENSOLARIS.LICENSE. |
9a488b15900f
Introduce a branded zone as a testing aid
Danek Duvall <danek.duvall@sun.com>
parents:
diff
changeset
|
16 |
# If applicable, add the following below this CDDL HEADER, with the |
9a488b15900f
Introduce a branded zone as a testing aid
Danek Duvall <danek.duvall@sun.com>
parents:
diff
changeset
|
17 |
# fields enclosed by brackets "[]" replaced with your own identifying |
9a488b15900f
Introduce a branded zone as a testing aid
Danek Duvall <danek.duvall@sun.com>
parents:
diff
changeset
|
18 |
# information: Portions Copyright [yyyy] [name of copyright owner] |
9a488b15900f
Introduce a branded zone as a testing aid
Danek Duvall <danek.duvall@sun.com>
parents:
diff
changeset
|
19 |
# |
9a488b15900f
Introduce a branded zone as a testing aid
Danek Duvall <danek.duvall@sun.com>
parents:
diff
changeset
|
20 |
# CDDL HEADER END |
9a488b15900f
Introduce a branded zone as a testing aid
Danek Duvall <danek.duvall@sun.com>
parents:
diff
changeset
|
21 |
# |
9a488b15900f
Introduce a branded zone as a testing aid
Danek Duvall <danek.duvall@sun.com>
parents:
diff
changeset
|
22 |
# |
9a488b15900f
Introduce a branded zone as a testing aid
Danek Duvall <danek.duvall@sun.com>
parents:
diff
changeset
|
23 |
# Copyright 2007 Sun Microsystems, Inc. All rights reserved. |
9a488b15900f
Introduce a branded zone as a testing aid
Danek Duvall <danek.duvall@sun.com>
parents:
diff
changeset
|
24 |
# Use is subject to license terms. |
9a488b15900f
Introduce a branded zone as a testing aid
Danek Duvall <danek.duvall@sun.com>
parents:
diff
changeset
|
25 |
# |
9a488b15900f
Introduce a branded zone as a testing aid
Danek Duvall <danek.duvall@sun.com>
parents:
diff
changeset
|
26 |
|
168 | 27 |
ZONE_SUBPROC_OK=0 |
28 |
ZONE_SUBPROC_USAGE=253 |
|
29 |
ZONE_SUBPROC_NOTCOMPLETE=254 |
|
30 |
ZONE_SUBPROC_FATAL=255 |
|
31 |
||
32 |
f_img=$(gettext "failed to create image") |
|
33 |
f_pkg=$(gettext "failed to install package") |
|
34 |
f_interrupted=$(gettext "Installation cancelled due to interrupt.") |
|
35 |
||
36 |
m_image=$(gettext " Image: Preparing at %s ...") |
|
37 |
m_catalog=$(gettext " Catalog: Retrieving from %s ...") |
|
280
84c03819796f
742 Zones are broken due to 681 and 741; supply workarounds
Dan Price <dp@eng.sun.com>
parents:
210
diff
changeset
|
38 |
m_core=$(gettext " Installing: (output follows)\n") |
168 | 39 |
m_smf=$(gettext "Postinstall: Copying SMF seed repository ...") |
280
84c03819796f
742 Zones are broken due to 681 and 741; supply workarounds
Dan Price <dp@eng.sun.com>
parents:
210
diff
changeset
|
40 |
m_brokenness=$(gettext "Postinstall: Working around http://defect.opensolaris.org/bz/show_bug.cgi?id=681") |
84c03819796f
742 Zones are broken due to 681 and 741; supply workarounds
Dan Price <dp@eng.sun.com>
parents:
210
diff
changeset
|
41 |
m_more_brokenness=$(gettext "Postinstall: Working around http://defect.opensolaris.org/bz/show_bug.cgi?id=741") |
168 | 42 |
m_mannote=$(gettext " Note: Man pages can be obtained by installing SUNWman") |
43 |
m_complete=$(gettext " Done: Installation completed in %s seconds.") |
|
44 |
m_postnote=$(gettext " Next Steps: Boot the zone, then log into the zone console") |
|
45 |
m_postnote2=$(gettext " (zlogin -C) to complete the configuration process") |
|
46 |
||
47 |
m_done=$(gettext " done.") |
|
48 |
||
49 |
||
50 |
fail_incomplete() { |
|
51 |
print -u2 "$1" |
|
52 |
exit $ZONE_SUBPROC_NOTCOMPLETE |
|
53 |
} |
|
54 |
||
55 |
fail_fatal() { |
|
56 |
print -u2 "$1" |
|
57 |
exit $ZONE_SUBPROC_FATAL |
|
58 |
} |
|
59 |
||
60 |
||
61 |
fail_usage() { |
|
62 |
print "Usage: $0 [-h] [-a <authority>]" |
|
97
9a488b15900f
Introduce a branded zone as a testing aid
Danek Duvall <danek.duvall@sun.com>
parents:
diff
changeset
|
63 |
exit $ZONE_SUBPROC_USAGE |
9a488b15900f
Introduce a branded zone as a testing aid
Danek Duvall <danek.duvall@sun.com>
parents:
diff
changeset
|
64 |
} |
9a488b15900f
Introduce a branded zone as a testing aid
Danek Duvall <danek.duvall@sun.com>
parents:
diff
changeset
|
65 |
|
9a488b15900f
Introduce a branded zone as a testing aid
Danek Duvall <danek.duvall@sun.com>
parents:
diff
changeset
|
66 |
trap_cleanup() { |
168 | 67 |
print "$f_interrupted" |
97
9a488b15900f
Introduce a branded zone as a testing aid
Danek Duvall <danek.duvall@sun.com>
parents:
diff
changeset
|
68 |
exit $int_code |
9a488b15900f
Introduce a branded zone as a testing aid
Danek Duvall <danek.duvall@sun.com>
parents:
diff
changeset
|
69 |
} |
9a488b15900f
Introduce a branded zone as a testing aid
Danek Duvall <danek.duvall@sun.com>
parents:
diff
changeset
|
70 |
|
9a488b15900f
Introduce a branded zone as a testing aid
Danek Duvall <danek.duvall@sun.com>
parents:
diff
changeset
|
71 |
int_code=$ZONE_SUBPROC_NOTCOMPLETE |
9a488b15900f
Introduce a branded zone as a testing aid
Danek Duvall <danek.duvall@sun.com>
parents:
diff
changeset
|
72 |
|
9a488b15900f
Introduce a branded zone as a testing aid
Danek Duvall <danek.duvall@sun.com>
parents:
diff
changeset
|
73 |
trap trap_cleanup INT |
9a488b15900f
Introduce a branded zone as a testing aid
Danek Duvall <danek.duvall@sun.com>
parents:
diff
changeset
|
74 |
|
168 | 75 |
zonename="" |
76 |
zonepath="" |
|
77 |
||
329 | 78 |
# |
79 |
# If there's a preferred authority set for the system, set that as our |
|
80 |
# default. Otherwise use opensolaris.org. |
|
81 |
# |
|
82 |
authority="opensolaris.org=http://pkg.opensolaris.org" |
|
83 |
if [[ -x /usr/bin/pkg ]]; then |
|
84 |
sysauth=`LC_ALL=C /usr/bin/pkg authority | grep preferred | awk '{printf "%s=%s", $1, $3}'` |
|
85 |
if [[ $? -eq 0 && -n "$sysauth" ]]; then |
|
86 |
authority=$sysauth |
|
87 |
fi |
|
88 |
fi |
|
89 |
||
168 | 90 |
# Setup i18n output |
91 |
TEXTDOMAIN="SUNW_OST_OSCMD" |
|
92 |
export TEXTDOMAIN |
|
93 |
||
94 |
||
95 |
while getopts "a:z:R:h" opt; do |
|
97
9a488b15900f
Introduce a branded zone as a testing aid
Danek Duvall <danek.duvall@sun.com>
parents:
diff
changeset
|
96 |
case $opt in |
168 | 97 |
h) fail_usage ;; |
98 |
R) zonepath="$OPTARG" ;; |
|
97
9a488b15900f
Introduce a branded zone as a testing aid
Danek Duvall <danek.duvall@sun.com>
parents:
diff
changeset
|
99 |
z) zonename="$OPTARG" ;; |
168 | 100 |
a) authority="$OPTARG" ;; |
101 |
*) fail_usage ;; |
|
97
9a488b15900f
Introduce a branded zone as a testing aid
Danek Duvall <danek.duvall@sun.com>
parents:
diff
changeset
|
102 |
esac |
9a488b15900f
Introduce a branded zone as a testing aid
Danek Duvall <danek.duvall@sun.com>
parents:
diff
changeset
|
103 |
done |
9a488b15900f
Introduce a branded zone as a testing aid
Danek Duvall <danek.duvall@sun.com>
parents:
diff
changeset
|
104 |
shift $((OPTIND-1)) |
9a488b15900f
Introduce a branded zone as a testing aid
Danek Duvall <danek.duvall@sun.com>
parents:
diff
changeset
|
105 |
|
168 | 106 |
if [[ -z $zonepath || -z $zonename ]]; then |
107 |
print -u2 "Brand error: No zone path or name" |
|
97
9a488b15900f
Introduce a branded zone as a testing aid
Danek Duvall <danek.duvall@sun.com>
parents:
diff
changeset
|
108 |
exit $ZONE_SUBPROC_USAGE |
9a488b15900f
Introduce a branded zone as a testing aid
Danek Duvall <danek.duvall@sun.com>
parents:
diff
changeset
|
109 |
fi |
9a488b15900f
Introduce a branded zone as a testing aid
Danek Duvall <danek.duvall@sun.com>
parents:
diff
changeset
|
110 |
|
168 | 111 |
zoneroot=$zonepath/root |
112 |
||
210
b1f4389f448d
239 Misleading image path $zonepath/root/root
mgerdts@gmail.com
parents:
206
diff
changeset
|
113 |
printf "\n$m_image" $zoneroot |
168 | 114 |
pkg image-create -z -F -a "$authority" $zoneroot || fail_fatal $f_img |
115 |
printf "$m_done\n" |
|
116 |
||
117 |
PKG_IMAGE="$zoneroot" |
|
118 |
export PKG_IMAGE |
|
119 |
||
280
84c03819796f
742 Zones are broken due to 681 and 741; supply workarounds
Dan Price <dp@eng.sun.com>
parents:
210
diff
changeset
|
120 |
printf "$m_catalog" `echo $authority | cut -d= -f 2` |
84c03819796f
742 Zones are broken due to 681 and 741; supply workarounds
Dan Price <dp@eng.sun.com>
parents:
210
diff
changeset
|
121 |
pkg refresh > /dev/null 2>&1 || fail_fatal "$f_refresh" |
98
2ac7781efe22
Package up the packaging system.
Danek Duvall <danek.duvall@sun.com>
parents:
97
diff
changeset
|
122 |
if [[ $? -ne 0 ]]; then |
2ac7781efe22
Package up the packaging system.
Danek Duvall <danek.duvall@sun.com>
parents:
97
diff
changeset
|
123 |
print "Failed to retrieve catalog" |
2ac7781efe22
Package up the packaging system.
Danek Duvall <danek.duvall@sun.com>
parents:
97
diff
changeset
|
124 |
exit 1 |
2ac7781efe22
Package up the packaging system.
Danek Duvall <danek.duvall@sun.com>
parents:
97
diff
changeset
|
125 |
fi |
168 | 126 |
printf "$m_done\n" |
127 |
||
280
84c03819796f
742 Zones are broken due to 681 and 741; supply workarounds
Dan Price <dp@eng.sun.com>
parents:
210
diff
changeset
|
128 |
printf "$m_core\n" |
84c03819796f
742 Zones are broken due to 681 and 741; supply workarounds
Dan Price <dp@eng.sun.com>
parents:
210
diff
changeset
|
129 |
pkg install -q SUNWcsd || fail_incomplete "$f_pkg" |
168 | 130 |
|
280
84c03819796f
742 Zones are broken due to 681 and 741; supply workarounds
Dan Price <dp@eng.sun.com>
parents:
210
diff
changeset
|
131 |
pkglist="" |
344
4c887185d780
528 pkg list -u gives confusing output
Dan Price <dp@eng.sun.com>
parents:
329
diff
changeset
|
132 |
pkglist="$pkglist SUNWcnetr SUNWesu SUNWadmr SUNWadmap SUNWbzip SUNWgzip" |
168 | 133 |
|
134 |
# |
|
135 |
# Workaround: in our test repo, SUNWipkg has no dependencies |
|
136 |
# so we must supply it python. |
|
137 |
# |
|
280
84c03819796f
742 Zones are broken due to 681 and 741; supply workarounds
Dan Price <dp@eng.sun.com>
parents:
210
diff
changeset
|
138 |
pkglist="$pkglist SUNWPython SUNWipkg" |
168 | 139 |
|
140 |
# |
|
141 |
# Get some diagnostic tools, truss, dtrace, etc. |
|
142 |
# |
|
280
84c03819796f
742 Zones are broken due to 681 and 741; supply workarounds
Dan Price <dp@eng.sun.com>
parents:
210
diff
changeset
|
143 |
pkglist="$pkglist SUNWtoo SUNWdtrc SUNWrcmdc SUNWbip" |
168 | 144 |
|
145 |
# |
|
280
84c03819796f
742 Zones are broken due to 681 and 741; supply workarounds
Dan Price <dp@eng.sun.com>
parents:
210
diff
changeset
|
146 |
# Get at least one sensible shell, and vi |
168 | 147 |
# |
280
84c03819796f
742 Zones are broken due to 681 and 741; supply workarounds
Dan Price <dp@eng.sun.com>
parents:
210
diff
changeset
|
148 |
pkglist="$pkglist SUNWbash SUNWvim" |
84c03819796f
742 Zones are broken due to 681 and 741; supply workarounds
Dan Price <dp@eng.sun.com>
parents:
210
diff
changeset
|
149 |
|
84c03819796f
742 Zones are broken due to 681 and 741; supply workarounds
Dan Price <dp@eng.sun.com>
parents:
210
diff
changeset
|
150 |
# |
84c03819796f
742 Zones are broken due to 681 and 741; supply workarounds
Dan Price <dp@eng.sun.com>
parents:
210
diff
changeset
|
151 |
# Get ssh and sshd. |
84c03819796f
742 Zones are broken due to 681 and 741; supply workarounds
Dan Price <dp@eng.sun.com>
parents:
210
diff
changeset
|
152 |
# |
84c03819796f
742 Zones are broken due to 681 and 741; supply workarounds
Dan Price <dp@eng.sun.com>
parents:
210
diff
changeset
|
153 |
pkglist="$pkglist SUNWsshcu SUNWssh SUNWsshd" |
168 | 154 |
|
155 |
# |
|
156 |
# Get some name services. |
|
157 |
# |
|
280
84c03819796f
742 Zones are broken due to 681 and 741; supply workarounds
Dan Price <dp@eng.sun.com>
parents:
210
diff
changeset
|
158 |
pkglist="$pkglist SUNWnis SUNWlldap" |
168 | 159 |
|
160 |
# |
|
329 | 161 |
# Get nfs client and autofs; it's a pain not to have them. |
162 |
# |
|
344
4c887185d780
528 pkg list -u gives confusing output
Dan Price <dp@eng.sun.com>
parents:
329
diff
changeset
|
163 |
pkglist="$pkglist SUNWnfsc SUNWatfs" |
329 | 164 |
|
165 |
||
166 |
# |
|
168 | 167 |
# Get man(1) but not the man pages |
168 |
# |
|
280
84c03819796f
742 Zones are broken due to 681 and 741; supply workarounds
Dan Price <dp@eng.sun.com>
parents:
210
diff
changeset
|
169 |
pkglist="$pkglist SUNWdoc" |
84c03819796f
742 Zones are broken due to 681 and 741; supply workarounds
Dan Price <dp@eng.sun.com>
parents:
210
diff
changeset
|
170 |
|
84c03819796f
742 Zones are broken due to 681 and 741; supply workarounds
Dan Price <dp@eng.sun.com>
parents:
210
diff
changeset
|
171 |
# Do the install |
84c03819796f
742 Zones are broken due to 681 and 741; supply workarounds
Dan Price <dp@eng.sun.com>
parents:
210
diff
changeset
|
172 |
pkg install $pkglist || fail_incomplete "$f_pkg" |
84c03819796f
742 Zones are broken due to 681 and 741; supply workarounds
Dan Price <dp@eng.sun.com>
parents:
210
diff
changeset
|
173 |
|
84c03819796f
742 Zones are broken due to 681 and 741; supply workarounds
Dan Price <dp@eng.sun.com>
parents:
210
diff
changeset
|
174 |
printf "\n$m_mannote\n" |
84c03819796f
742 Zones are broken due to 681 and 741; supply workarounds
Dan Price <dp@eng.sun.com>
parents:
210
diff
changeset
|
175 |
|
84c03819796f
742 Zones are broken due to 681 and 741; supply workarounds
Dan Price <dp@eng.sun.com>
parents:
210
diff
changeset
|
176 |
printf "$m_smf" |
84c03819796f
742 Zones are broken due to 681 and 741; supply workarounds
Dan Price <dp@eng.sun.com>
parents:
210
diff
changeset
|
177 |
ln -s ns_files.xml $zoneroot/var/svc/profile/name_service.xml |
84c03819796f
742 Zones are broken due to 681 and 741; supply workarounds
Dan Price <dp@eng.sun.com>
parents:
210
diff
changeset
|
178 |
ln -s generic_limited_net.xml $zoneroot/var/svc/profile/generic.xml |
84c03819796f
742 Zones are broken due to 681 and 741; supply workarounds
Dan Price <dp@eng.sun.com>
parents:
210
diff
changeset
|
179 |
ln -s inetd_generic.xml $zoneroot/var/svc/profile/inetd_services.xml |
84c03819796f
742 Zones are broken due to 681 and 741; supply workarounds
Dan Price <dp@eng.sun.com>
parents:
210
diff
changeset
|
180 |
ln -s platform_none.xml $zoneroot/var/svc/profile/platform.xml |
84c03819796f
742 Zones are broken due to 681 and 741; supply workarounds
Dan Price <dp@eng.sun.com>
parents:
210
diff
changeset
|
181 |
|
84c03819796f
742 Zones are broken due to 681 and 741; supply workarounds
Dan Price <dp@eng.sun.com>
parents:
210
diff
changeset
|
182 |
# This was formerly done in i.manifest |
84c03819796f
742 Zones are broken due to 681 and 741; supply workarounds
Dan Price <dp@eng.sun.com>
parents:
210
diff
changeset
|
183 |
cp $zoneroot/lib/svc/seed/nonglobal.db $zoneroot/etc/svc/repository.db |
168 | 184 |
printf "$m_done\n" |
280
84c03819796f
742 Zones are broken due to 681 and 741; supply workarounds
Dan Price <dp@eng.sun.com>
parents:
210
diff
changeset
|
185 |
|
84c03819796f
742 Zones are broken due to 681 and 741; supply workarounds
Dan Price <dp@eng.sun.com>
parents:
210
diff
changeset
|
186 |
|
84c03819796f
742 Zones are broken due to 681 and 741; supply workarounds
Dan Price <dp@eng.sun.com>
parents:
210
diff
changeset
|
187 |
printf "$m_brokenness\n" |
84c03819796f
742 Zones are broken due to 681 and 741; supply workarounds
Dan Price <dp@eng.sun.com>
parents:
210
diff
changeset
|
188 |
# |
84c03819796f
742 Zones are broken due to 681 and 741; supply workarounds
Dan Price <dp@eng.sun.com>
parents:
210
diff
changeset
|
189 |
# Remove "jack" user. |
84c03819796f
742 Zones are broken due to 681 and 741; supply workarounds
Dan Price <dp@eng.sun.com>
parents:
210
diff
changeset
|
190 |
# |
84c03819796f
742 Zones are broken due to 681 and 741; supply workarounds
Dan Price <dp@eng.sun.com>
parents:
210
diff
changeset
|
191 |
sed '/^jack:.*Default\ User.*$/D' $zoneroot/etc/passwd \ |
84c03819796f
742 Zones are broken due to 681 and 741; supply workarounds
Dan Price <dp@eng.sun.com>
parents:
210
diff
changeset
|
192 |
> $zoneroot/etc/passwd.new && \ |
84c03819796f
742 Zones are broken due to 681 and 741; supply workarounds
Dan Price <dp@eng.sun.com>
parents:
210
diff
changeset
|
193 |
mv -f $zoneroot/etc/passwd.new $zoneroot/etc/passwd |
84c03819796f
742 Zones are broken due to 681 and 741; supply workarounds
Dan Price <dp@eng.sun.com>
parents:
210
diff
changeset
|
194 |
|
84c03819796f
742 Zones are broken due to 681 and 741; supply workarounds
Dan Price <dp@eng.sun.com>
parents:
210
diff
changeset
|
195 |
|
84c03819796f
742 Zones are broken due to 681 and 741; supply workarounds
Dan Price <dp@eng.sun.com>
parents:
210
diff
changeset
|
196 |
# |
84c03819796f
742 Zones are broken due to 681 and 741; supply workarounds
Dan Price <dp@eng.sun.com>
parents:
210
diff
changeset
|
197 |
# Set root from a role back to... not a role. Grr. |
84c03819796f
742 Zones are broken due to 681 and 741; supply workarounds
Dan Price <dp@eng.sun.com>
parents:
210
diff
changeset
|
198 |
# |
84c03819796f
742 Zones are broken due to 681 and 741; supply workarounds
Dan Price <dp@eng.sun.com>
parents:
210
diff
changeset
|
199 |
sed 's/^root::::type=role;/root::::/' $zoneroot/etc/user_attr \ |
84c03819796f
742 Zones are broken due to 681 and 741; supply workarounds
Dan Price <dp@eng.sun.com>
parents:
210
diff
changeset
|
200 |
> $zoneroot/etc/user_attr.new && \ |
84c03819796f
742 Zones are broken due to 681 and 741; supply workarounds
Dan Price <dp@eng.sun.com>
parents:
210
diff
changeset
|
201 |
mv -f $zoneroot/etc/user_attr.new $zoneroot/etc/user_attr |
84c03819796f
742 Zones are broken due to 681 and 741; supply workarounds
Dan Price <dp@eng.sun.com>
parents:
210
diff
changeset
|
202 |
|
84c03819796f
742 Zones are broken due to 681 and 741; supply workarounds
Dan Price <dp@eng.sun.com>
parents:
210
diff
changeset
|
203 |
# |
84c03819796f
742 Zones are broken due to 681 and 741; supply workarounds
Dan Price <dp@eng.sun.com>
parents:
210
diff
changeset
|
204 |
# Make sure sysidtools run; we manually poke in the SSH action |
84c03819796f
742 Zones are broken due to 681 and 741; supply workarounds
Dan Price <dp@eng.sun.com>
parents:
210
diff
changeset
|
205 |
# so that we get an SSH key. Yes, this is seriously borken. |
84c03819796f
742 Zones are broken due to 681 and 741; supply workarounds
Dan Price <dp@eng.sun.com>
parents:
210
diff
changeset
|
206 |
# |
84c03819796f
742 Zones are broken due to 681 and 741; supply workarounds
Dan Price <dp@eng.sun.com>
parents:
210
diff
changeset
|
207 |
printf "$m_more_brokenness\n" |
84c03819796f
742 Zones are broken due to 681 and 741; supply workarounds
Dan Price <dp@eng.sun.com>
parents:
210
diff
changeset
|
208 |
/usr/sbin/sysidconfig -b $zoneroot -a /lib/svc/method/sshd |
84c03819796f
742 Zones are broken due to 681 and 741; supply workarounds
Dan Price <dp@eng.sun.com>
parents:
210
diff
changeset
|
209 |
touch $zoneroot/etc/.UNCONFIGURED |
84c03819796f
742 Zones are broken due to 681 and 741; supply workarounds
Dan Price <dp@eng.sun.com>
parents:
210
diff
changeset
|
210 |
|
84c03819796f
742 Zones are broken due to 681 and 741; supply workarounds
Dan Price <dp@eng.sun.com>
parents:
210
diff
changeset
|
211 |
# |
84c03819796f
742 Zones are broken due to 681 and 741; supply workarounds
Dan Price <dp@eng.sun.com>
parents:
210
diff
changeset
|
212 |
# Make sure sysidtool configures ssh keys |
84c03819796f
742 Zones are broken due to 681 and 741; supply workarounds
Dan Price <dp@eng.sun.com>
parents:
210
diff
changeset
|
213 |
# |
84c03819796f
742 Zones are broken due to 681 and 741; supply workarounds
Dan Price <dp@eng.sun.com>
parents:
210
diff
changeset
|
214 |
|
84c03819796f
742 Zones are broken due to 681 and 741; supply workarounds
Dan Price <dp@eng.sun.com>
parents:
210
diff
changeset
|
215 |
printf "$m_complete\n\n" ${SECONDS} |
84c03819796f
742 Zones are broken due to 681 and 741; supply workarounds
Dan Price <dp@eng.sun.com>
parents:
210
diff
changeset
|
216 |
printf "$m_postnote\n" |
84c03819796f
742 Zones are broken due to 681 and 741; supply workarounds
Dan Price <dp@eng.sun.com>
parents:
210
diff
changeset
|
217 |
printf "$m_postnote2\n" |
84c03819796f
742 Zones are broken due to 681 and 741; supply workarounds
Dan Price <dp@eng.sun.com>
parents:
210
diff
changeset
|
218 |
|
84c03819796f
742 Zones are broken due to 681 and 741; supply workarounds
Dan Price <dp@eng.sun.com>
parents:
210
diff
changeset
|
219 |
exit $ZONE_SUBPROC_OK |
168 | 220 |
|
221 |
# XXX leaving this out for now. Reconsider later. |
|
222 |
# |
|
223 |
# Core X and GNOME -- I add these because it's easy to overlook that |
|
224 |
# you need fonts, and the result is that fontconfig dumps core a lot. |
|
225 |
# |
|
226 |
#printf $m_corex |
|
227 |
#pkg install SUNWfontconfig FSWxorg-fonts || fail_incomplete "$f_pkg" |
|
228 |
#pkg install SUNWxorg-client-programs SUNWgnome-fonts || fail_incomplete "$f_pkg" |
|
229 |
#pkg install SUNWgnome-base-libs SUNWgnome-panel || fail_incomplete "$f_pkg" |
|
230 |
## |
|
231 |
## workaround for lack of xterm, and add GDM since it's nice to have it. |
|
232 |
## |
|
233 |
#pkg install SUNWgnome-terminal || fail_incomplete "$f_pkg" |
|
234 |
#pkg install SUNWgnome-display-mgr || fail_incomplete "$f_pkg" |
|
235 |
||
97
9a488b15900f
Introduce a branded zone as a testing aid
Danek Duvall <danek.duvall@sun.com>
parents:
diff
changeset
|
236 |
# This was formerly done in SUNWcsr/postinstall |
168 | 237 |