author | Dan Price <dp@eng.sun.com> |
Sun, 04 May 2008 18:11:59 -0700 | |
changeset 371 | e4db4be79d2e |
parent 344 | 4c887185d780 |
child 438 | 69202d962ff6 |
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 |
# |
371
e4db4be79d2e
1756 IPS Zone creation includes shadow entry for jack
Dan Price <dp@eng.sun.com>
parents:
344
diff
changeset
|
23 |
# Copyright 2008 Sun Microsystems, Inc. All rights reserved. |
97
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 |
||
371
e4db4be79d2e
1756 IPS Zone creation includes shadow entry for jack
Dan Price <dp@eng.sun.com>
parents:
344
diff
changeset
|
36 |
m_authority=$(gettext " Authority: Using %s.") |
168 | 37 |
m_image=$(gettext " Image: Preparing at %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 |
||
371
e4db4be79d2e
1756 IPS Zone creation includes shadow entry for jack
Dan Price <dp@eng.sun.com>
parents:
344
diff
changeset
|
113 |
printf "$m_authority" `echo $authority | cut -d= -f 2` |
210
b1f4389f448d
239 Misleading image path $zonepath/root/root
mgerdts@gmail.com
parents:
206
diff
changeset
|
114 |
printf "\n$m_image" $zoneroot |
168 | 115 |
pkg image-create -z -F -a "$authority" $zoneroot || fail_fatal $f_img |
116 |
printf "$m_done\n" |
|
117 |
||
118 |
PKG_IMAGE="$zoneroot" |
|
119 |
export PKG_IMAGE |
|
120 |
||
280
84c03819796f
742 Zones are broken due to 681 and 741; supply workarounds
Dan Price <dp@eng.sun.com>
parents:
210
diff
changeset
|
121 |
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
|
122 |
pkg install -q SUNWcsd || fail_incomplete "$f_pkg" |
168 | 123 |
|
280
84c03819796f
742 Zones are broken due to 681 and 741; supply workarounds
Dan Price <dp@eng.sun.com>
parents:
210
diff
changeset
|
124 |
pkglist="" |
344
4c887185d780
528 pkg list -u gives confusing output
Dan Price <dp@eng.sun.com>
parents:
329
diff
changeset
|
125 |
pkglist="$pkglist SUNWcnetr SUNWesu SUNWadmr SUNWadmap SUNWbzip SUNWgzip" |
168 | 126 |
|
127 |
# |
|
371
e4db4be79d2e
1756 IPS Zone creation includes shadow entry for jack
Dan Price <dp@eng.sun.com>
parents:
344
diff
changeset
|
128 |
# Workaround: For now, SUNWipkg has no dependencies so we must supply it python. |
168 | 129 |
# |
280
84c03819796f
742 Zones are broken due to 681 and 741; supply workarounds
Dan Price <dp@eng.sun.com>
parents:
210
diff
changeset
|
130 |
pkglist="$pkglist SUNWPython SUNWipkg" |
168 | 131 |
|
132 |
# |
|
133 |
# Get some diagnostic tools, truss, dtrace, etc. |
|
134 |
# |
|
280
84c03819796f
742 Zones are broken due to 681 and 741; supply workarounds
Dan Price <dp@eng.sun.com>
parents:
210
diff
changeset
|
135 |
pkglist="$pkglist SUNWtoo SUNWdtrc SUNWrcmdc SUNWbip" |
168 | 136 |
|
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 |
# Get at least one sensible shell, and vi |
168 | 139 |
# |
280
84c03819796f
742 Zones are broken due to 681 and 741; supply workarounds
Dan Price <dp@eng.sun.com>
parents:
210
diff
changeset
|
140 |
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
|
141 |
|
84c03819796f
742 Zones are broken due to 681 and 741; supply workarounds
Dan Price <dp@eng.sun.com>
parents:
210
diff
changeset
|
142 |
# |
84c03819796f
742 Zones are broken due to 681 and 741; supply workarounds
Dan Price <dp@eng.sun.com>
parents:
210
diff
changeset
|
143 |
# 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
|
144 |
# |
84c03819796f
742 Zones are broken due to 681 and 741; supply workarounds
Dan Price <dp@eng.sun.com>
parents:
210
diff
changeset
|
145 |
pkglist="$pkglist SUNWsshcu SUNWssh SUNWsshd" |
168 | 146 |
|
147 |
# |
|
148 |
# Get some name services. |
|
149 |
# |
|
280
84c03819796f
742 Zones are broken due to 681 and 741; supply workarounds
Dan Price <dp@eng.sun.com>
parents:
210
diff
changeset
|
150 |
pkglist="$pkglist SUNWnis SUNWlldap" |
168 | 151 |
|
152 |
# |
|
329 | 153 |
# Get nfs client and autofs; it's a pain not to have them. |
154 |
# |
|
344
4c887185d780
528 pkg list -u gives confusing output
Dan Price <dp@eng.sun.com>
parents:
329
diff
changeset
|
155 |
pkglist="$pkglist SUNWnfsc SUNWatfs" |
329 | 156 |
|
157 |
||
158 |
# |
|
168 | 159 |
# Get man(1) but not the man pages |
160 |
# |
|
280
84c03819796f
742 Zones are broken due to 681 and 741; supply workarounds
Dan Price <dp@eng.sun.com>
parents:
210
diff
changeset
|
161 |
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
|
162 |
|
84c03819796f
742 Zones are broken due to 681 and 741; supply workarounds
Dan Price <dp@eng.sun.com>
parents:
210
diff
changeset
|
163 |
# 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
|
164 |
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
|
165 |
|
84c03819796f
742 Zones are broken due to 681 and 741; supply workarounds
Dan Price <dp@eng.sun.com>
parents:
210
diff
changeset
|
166 |
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
|
167 |
|
84c03819796f
742 Zones are broken due to 681 and 741; supply workarounds
Dan Price <dp@eng.sun.com>
parents:
210
diff
changeset
|
168 |
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
|
169 |
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
|
170 |
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
|
171 |
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
|
172 |
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
|
173 |
|
84c03819796f
742 Zones are broken due to 681 and 741; supply workarounds
Dan Price <dp@eng.sun.com>
parents:
210
diff
changeset
|
174 |
# This was formerly done in i.manifest |
371
e4db4be79d2e
1756 IPS Zone creation includes shadow entry for jack
Dan Price <dp@eng.sun.com>
parents:
344
diff
changeset
|
175 |
repfile=$zoneroot/etc/svc/repository.db |
e4db4be79d2e
1756 IPS Zone creation includes shadow entry for jack
Dan Price <dp@eng.sun.com>
parents:
344
diff
changeset
|
176 |
cp $zoneroot/lib/svc/seed/nonglobal.db $repfile |
e4db4be79d2e
1756 IPS Zone creation includes shadow entry for jack
Dan Price <dp@eng.sun.com>
parents:
344
diff
changeset
|
177 |
chmod 0600 $repfile |
e4db4be79d2e
1756 IPS Zone creation includes shadow entry for jack
Dan Price <dp@eng.sun.com>
parents:
344
diff
changeset
|
178 |
chown root:sys $repfile |
e4db4be79d2e
1756 IPS Zone creation includes shadow entry for jack
Dan Price <dp@eng.sun.com>
parents:
344
diff
changeset
|
179 |
|
168 | 180 |
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
|
181 |
|
84c03819796f
742 Zones are broken due to 681 and 741; supply workarounds
Dan Price <dp@eng.sun.com>
parents:
210
diff
changeset
|
182 |
|
84c03819796f
742 Zones are broken due to 681 and 741; supply workarounds
Dan Price <dp@eng.sun.com>
parents:
210
diff
changeset
|
183 |
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
|
184 |
# |
84c03819796f
742 Zones are broken due to 681 and 741; supply workarounds
Dan Price <dp@eng.sun.com>
parents:
210
diff
changeset
|
185 |
# 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
|
186 |
# |
371
e4db4be79d2e
1756 IPS Zone creation includes shadow entry for jack
Dan Price <dp@eng.sun.com>
parents:
344
diff
changeset
|
187 |
print "/^jack:/d\nw" | ed -s $zoneroot/etc/passwd |
e4db4be79d2e
1756 IPS Zone creation includes shadow entry for jack
Dan Price <dp@eng.sun.com>
parents:
344
diff
changeset
|
188 |
chmod u+w $zoneroot/etc/shadow |
e4db4be79d2e
1756 IPS Zone creation includes shadow entry for jack
Dan Price <dp@eng.sun.com>
parents:
344
diff
changeset
|
189 |
print "/^jack:/d\nw" | ed -s $zoneroot/etc/shadow |
e4db4be79d2e
1756 IPS Zone creation includes shadow entry for jack
Dan Price <dp@eng.sun.com>
parents:
344
diff
changeset
|
190 |
chmod u-w $zoneroot/etc/shadow |
280
84c03819796f
742 Zones are broken due to 681 and 741; supply workarounds
Dan Price <dp@eng.sun.com>
parents:
210
diff
changeset
|
191 |
|
84c03819796f
742 Zones are broken due to 681 and 741; supply workarounds
Dan Price <dp@eng.sun.com>
parents:
210
diff
changeset
|
192 |
# |
84c03819796f
742 Zones are broken due to 681 and 741; supply workarounds
Dan Price <dp@eng.sun.com>
parents:
210
diff
changeset
|
193 |
# 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
|
194 |
# |
371
e4db4be79d2e
1756 IPS Zone creation includes shadow entry for jack
Dan Price <dp@eng.sun.com>
parents:
344
diff
changeset
|
195 |
print "s/^root::::type=role;/root::::/\nw" | ed -s $zoneroot/etc/user_attr |
280
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 |
# |
84c03819796f
742 Zones are broken due to 681 and 741; supply workarounds
Dan Price <dp@eng.sun.com>
parents:
210
diff
changeset
|
198 |
# 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
|
199 |
# 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
|
200 |
# |
84c03819796f
742 Zones are broken due to 681 and 741; supply workarounds
Dan Price <dp@eng.sun.com>
parents:
210
diff
changeset
|
201 |
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
|
202 |
/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
|
203 |
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
|
204 |
|
84c03819796f
742 Zones are broken due to 681 and 741; supply workarounds
Dan Price <dp@eng.sun.com>
parents:
210
diff
changeset
|
205 |
|
84c03819796f
742 Zones are broken due to 681 and 741; supply workarounds
Dan Price <dp@eng.sun.com>
parents:
210
diff
changeset
|
206 |
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
|
207 |
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
|
208 |
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
|
209 |
|
84c03819796f
742 Zones are broken due to 681 and 741; supply workarounds
Dan Price <dp@eng.sun.com>
parents:
210
diff
changeset
|
210 |
exit $ZONE_SUBPROC_OK |