usr/src/cmd/slim-install/svc/media-assembly
author Karen Tung <Karen.Tung@oracle.com>
Thu, 04 Aug 2011 11:23:50 -0700
changeset 1357 c6b82080c0ba
parent 1067 828e0e14daa2
permissions -rw-r--r--
7068988 The physical:default fails when booting from Auto Install media, unable to get manifest 7074534 Should remove /usr/sbin/install-finish and mkmenu due to slim_source code clean up of 7053542
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
51
fb1f0308a90b 20 SUNWslim-utils needs to move into slim gate
Virginia Wray <Virginia.Wray@Sun.COM>
parents:
diff changeset
     1
#!/sbin/sh
fb1f0308a90b 20 SUNWslim-utils needs to move into slim gate
Virginia Wray <Virginia.Wray@Sun.COM>
parents:
diff changeset
     2
#
fb1f0308a90b 20 SUNWslim-utils needs to move into slim gate
Virginia Wray <Virginia.Wray@Sun.COM>
parents:
diff changeset
     3
# CDDL HEADER START
fb1f0308a90b 20 SUNWslim-utils needs to move into slim gate
Virginia Wray <Virginia.Wray@Sun.COM>
parents:
diff changeset
     4
#
fb1f0308a90b 20 SUNWslim-utils needs to move into slim gate
Virginia Wray <Virginia.Wray@Sun.COM>
parents:
diff changeset
     5
# The contents of this file are subject to the terms of the
59
9a3c7b194de4 Fixes bugs 532 and 838.
Sanjay Nadkarni <nadkarni@sun.com>
parents: 53
diff changeset
     6
# Common Development and Distribution License (the "License").
9a3c7b194de4 Fixes bugs 532 and 838.
Sanjay Nadkarni <nadkarni@sun.com>
parents: 53
diff changeset
     7
# You may not use this file except in compliance with the License.
51
fb1f0308a90b 20 SUNWslim-utils needs to move into slim gate
Virginia Wray <Virginia.Wray@Sun.COM>
parents:
diff changeset
     8
#
fb1f0308a90b 20 SUNWslim-utils needs to move into slim gate
Virginia Wray <Virginia.Wray@Sun.COM>
parents:
diff changeset
     9
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
fb1f0308a90b 20 SUNWslim-utils needs to move into slim gate
Virginia Wray <Virginia.Wray@Sun.COM>
parents:
diff changeset
    10
# or http://www.opensolaris.org/os/licensing.
fb1f0308a90b 20 SUNWslim-utils needs to move into slim gate
Virginia Wray <Virginia.Wray@Sun.COM>
parents:
diff changeset
    11
# See the License for the specific language governing permissions
fb1f0308a90b 20 SUNWslim-utils needs to move into slim gate
Virginia Wray <Virginia.Wray@Sun.COM>
parents:
diff changeset
    12
# and limitations under the License.
fb1f0308a90b 20 SUNWslim-utils needs to move into slim gate
Virginia Wray <Virginia.Wray@Sun.COM>
parents:
diff changeset
    13
#
fb1f0308a90b 20 SUNWslim-utils needs to move into slim gate
Virginia Wray <Virginia.Wray@Sun.COM>
parents:
diff changeset
    14
# When distributing Covered Code, include this CDDL HEADER in each
fb1f0308a90b 20 SUNWslim-utils needs to move into slim gate
Virginia Wray <Virginia.Wray@Sun.COM>
parents:
diff changeset
    15
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
fb1f0308a90b 20 SUNWslim-utils needs to move into slim gate
Virginia Wray <Virginia.Wray@Sun.COM>
parents:
diff changeset
    16
# If applicable, add the following below this CDDL HEADER, with the
fb1f0308a90b 20 SUNWslim-utils needs to move into slim gate
Virginia Wray <Virginia.Wray@Sun.COM>
parents:
diff changeset
    17
# fields enclosed by brackets "[]" replaced with your own identifying
fb1f0308a90b 20 SUNWslim-utils needs to move into slim gate
Virginia Wray <Virginia.Wray@Sun.COM>
parents:
diff changeset
    18
# information: Portions Copyright [yyyy] [name of copyright owner]
fb1f0308a90b 20 SUNWslim-utils needs to move into slim gate
Virginia Wray <Virginia.Wray@Sun.COM>
parents:
diff changeset
    19
#
fb1f0308a90b 20 SUNWslim-utils needs to move into slim gate
Virginia Wray <Virginia.Wray@Sun.COM>
parents:
diff changeset
    20
# CDDL HEADER END
fb1f0308a90b 20 SUNWslim-utils needs to move into slim gate
Virginia Wray <Virginia.Wray@Sun.COM>
parents:
diff changeset
    21
#
fb1f0308a90b 20 SUNWslim-utils needs to move into slim gate
Virginia Wray <Virginia.Wray@Sun.COM>
parents:
diff changeset
    22
#
1001
fa5c7a246a82 1351 combine listcd and listusb.
David Miner <dminer@opensolaris.org>
parents: 943
diff changeset
    23
# Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
51
fb1f0308a90b 20 SUNWslim-utils needs to move into slim gate
Virginia Wray <Virginia.Wray@Sun.COM>
parents:
diff changeset
    24
#
fb1f0308a90b 20 SUNWslim-utils needs to move into slim gate
Virginia Wray <Virginia.Wray@Sun.COM>
parents:
diff changeset
    25
#
fb1f0308a90b 20 SUNWslim-utils needs to move into slim gate
Virginia Wray <Virginia.Wray@Sun.COM>
parents:
diff changeset
    26
# Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T.
fb1f0308a90b 20 SUNWslim-utils needs to move into slim gate
Virginia Wray <Virginia.Wray@Sun.COM>
parents:
diff changeset
    27
# All rights reserved.
fb1f0308a90b 20 SUNWslim-utils needs to move into slim gate
Virginia Wray <Virginia.Wray@Sun.COM>
parents:
diff changeset
    28
#
fb1f0308a90b 20 SUNWslim-utils needs to move into slim gate
Virginia Wray <Virginia.Wray@Sun.COM>
parents:
diff changeset
    29
fb1f0308a90b 20 SUNWslim-utils needs to move into slim gate
Virginia Wray <Virginia.Wray@Sun.COM>
parents:
diff changeset
    30
# Make sure that the libraries essential to this stage of booting can be found.
fb1f0308a90b 20 SUNWslim-utils needs to move into slim gate
Virginia Wray <Virginia.Wray@Sun.COM>
parents:
diff changeset
    31
LD_LIBRARY_PATH=/lib; export LD_LIBRARY_PATH
fb1f0308a90b 20 SUNWslim-utils needs to move into slim gate
Virginia Wray <Virginia.Wray@Sun.COM>
parents:
diff changeset
    32
1001
fa5c7a246a82 1351 combine listcd and listusb.
David Miner <dminer@opensolaris.org>
parents: 943
diff changeset
    33
. /lib/svc/share/media_include.sh
51
fb1f0308a90b 20 SUNWslim-utils needs to move into slim gate
Virginia Wray <Virginia.Wray@Sun.COM>
parents:
diff changeset
    34
. /lib/svc/share/smf_include.sh
fb1f0308a90b 20 SUNWslim-utils needs to move into slim gate
Virginia Wray <Virginia.Wray@Sun.COM>
parents:
diff changeset
    35
. /lib/svc/share/fs_include.sh
fb1f0308a90b 20 SUNWslim-utils needs to move into slim gate
Virginia Wray <Virginia.Wray@Sun.COM>
parents:
diff changeset
    36
817
8abc87bee984 15571 long volume IDs break x86 ISO image builds if customized grub menu is long
Alexander Eremin <eremin@milax.org>
parents: 803
diff changeset
    37
volsetid=$( < "/.volsetid" )
228
ce1adec5a11c 3634 live-fs-root needs to be enhanced for AI purposes
Jan Damborsky <jan.damborsky@sun.com>
parents: 182
diff changeset
    38
1001
fa5c7a246a82 1351 combine listcd and listusb.
David Miner <dminer@opensolaris.org>
parents: 943
diff changeset
    39
echo "\rPreparing image for use" >/dev/msglog
660
d87123ecef4a 10039 Blocker for AI Bootable Media
Alok Aggarwal <Alok.Aggarwal@Sun.COM>
parents: 636
diff changeset
    40
1067
828e0e14daa2 7023487 Need to update the distro_constructor to accomodate /sbin becoming a link to /usr/sbin
Margot Miller <Margot.Miller@Sun.COM>
parents: 1001
diff changeset
    41
/usr/sbin/mount_media $volsetid
660
d87123ecef4a 10039 Blocker for AI Bootable Media
Alok Aggarwal <Alok.Aggarwal@Sun.COM>
parents: 636
diff changeset
    42
if [ $? -ne 0 ]; then
1001
fa5c7a246a82 1351 combine listcd and listusb.
David Miner <dminer@opensolaris.org>
parents: 943
diff changeset
    43
	echo "Unable to mount media"
660
d87123ecef4a 10039 Blocker for AI Bootable Media
Alok Aggarwal <Alok.Aggarwal@Sun.COM>
parents: 636
diff changeset
    44
	exit $SMF_EXIT_ERR_FATAL
d87123ecef4a 10039 Blocker for AI Bootable Media
Alok Aggarwal <Alok.Aggarwal@Sun.COM>
parents: 636
diff changeset
    45
fi
d87123ecef4a 10039 Blocker for AI Bootable Media
Alok Aggarwal <Alok.Aggarwal@Sun.COM>
parents: 636
diff changeset
    46
1001
fa5c7a246a82 1351 combine listcd and listusb.
David Miner <dminer@opensolaris.org>
parents: 943
diff changeset
    47
#
fa5c7a246a82 1351 combine listcd and listusb.
David Miner <dminer@opensolaris.org>
parents: 943
diff changeset
    48
# Can not mount compressed lofi archives here using just the mount command
fa5c7a246a82 1351 combine listcd and listusb.
David Miner <dminer@opensolaris.org>
parents: 943
diff changeset
    49
# for two reasons:
660
d87123ecef4a 10039 Blocker for AI Bootable Media
Alok Aggarwal <Alok.Aggarwal@Sun.COM>
parents: 636
diff changeset
    50
#
1001
fa5c7a246a82 1351 combine listcd and listusb.
David Miner <dminer@opensolaris.org>
parents: 943
diff changeset
    51
# 1.  The mount command enforces nosetuid on automatic lofi mounts;
fa5c7a246a82 1351 combine listcd and listusb.
David Miner <dminer@opensolaris.org>
parents: 943
diff changeset
    52
# /usr needs to have setuid capability.
fa5c7a246a82 1351 combine listcd and listusb.
David Miner <dminer@opensolaris.org>
parents: 943
diff changeset
    53
# 2.  The changes to make lofi work from within a zone require
fa5c7a246a82 1351 combine listcd and listusb.
David Miner <dminer@opensolaris.org>
parents: 943
diff changeset
    54
# a properly populated /dev tree for automatic lofi mounts.
844
9da22daff5a7 16400 exec_methods in distro constructor need to add the required parameter "timeout_seconds"
Keith Mitchell <keith.mitchell@oracle.com>
parents: 817
diff changeset
    55
#
9da22daff5a7 16400 exec_methods in distro constructor need to add the required parameter "timeout_seconds"
Keith Mitchell <keith.mitchell@oracle.com>
parents: 817
diff changeset
    56
usr_lofi_dev=$(/usr/sbin/lofiadm -a /.cdrom/$SOLARIS_ZLIB)
9da22daff5a7 16400 exec_methods in distro constructor need to add the required parameter "timeout_seconds"
Keith Mitchell <keith.mitchell@oracle.com>
parents: 817
diff changeset
    57
if [ $? -ne 0 -o -z "$usr_lofi_dev" ]; then
1001
fa5c7a246a82 1351 combine listcd and listusb.
David Miner <dminer@opensolaris.org>
parents: 943
diff changeset
    58
	echo "Unable to add lofi device for $SOLARIS_ZLIB" > /dev/msglog
660
d87123ecef4a 10039 Blocker for AI Bootable Media
Alok Aggarwal <Alok.Aggarwal@Sun.COM>
parents: 636
diff changeset
    59
	exit $SMF_EXIT_ERR_FATAL
d87123ecef4a 10039 Blocker for AI Bootable Media
Alok Aggarwal <Alok.Aggarwal@Sun.COM>
parents: 636
diff changeset
    60
fi
123
f2dbdac1affb 315 Indiana needs to support being run as an xVM DomU guest
Sanjay Nadkarni <nadkarni@sun.com>
parents: 93
diff changeset
    61
1001
fa5c7a246a82 1351 combine listcd and listusb.
David Miner <dminer@opensolaris.org>
parents: 943
diff changeset
    62
$MOUNT -F hsfs -o ro ${usr_lofi_dev} /usr
fa5c7a246a82 1351 combine listcd and listusb.
David Miner <dminer@opensolaris.org>
parents: 943
diff changeset
    63
if [ $? -ne 0 ]; then
fa5c7a246a82 1351 combine listcd and listusb.
David Miner <dminer@opensolaris.org>
parents: 943
diff changeset
    64
	echo "Unable to mount /usr filesystem" > /dev/msglog
fa5c7a246a82 1351 combine listcd and listusb.
David Miner <dminer@opensolaris.org>
parents: 943
diff changeset
    65
	exit $SMF_EXIT_ERR_FATAL
fa5c7a246a82 1351 combine listcd and listusb.
David Miner <dminer@opensolaris.org>
parents: 943
diff changeset
    66
fi
660
d87123ecef4a 10039 Blocker for AI Bootable Media
Alok Aggarwal <Alok.Aggarwal@Sun.COM>
parents: 636
diff changeset
    67
844
9da22daff5a7 16400 exec_methods in distro constructor need to add the required parameter "timeout_seconds"
Keith Mitchell <keith.mitchell@oracle.com>
parents: 817
diff changeset
    68
misc_lofi_dev=$(/usr/sbin/lofiadm -a /.cdrom/$SOLARISMISC_ZLIB)
9da22daff5a7 16400 exec_methods in distro constructor need to add the required parameter "timeout_seconds"
Keith Mitchell <keith.mitchell@oracle.com>
parents: 817
diff changeset
    69
if [ $? -ne 0 -o -z "$misc_lofi_dev" ]; then
1001
fa5c7a246a82 1351 combine listcd and listusb.
David Miner <dminer@opensolaris.org>
parents: 943
diff changeset
    70
	echo "Unable to add lofi device for $SOLARISMISC_ZLIB" > /dev/msglog
844
9da22daff5a7 16400 exec_methods in distro constructor need to add the required parameter "timeout_seconds"
Keith Mitchell <keith.mitchell@oracle.com>
parents: 817
diff changeset
    71
	exit $SMF_EXIT_ERR_FATAL
9da22daff5a7 16400 exec_methods in distro constructor need to add the required parameter "timeout_seconds"
Keith Mitchell <keith.mitchell@oracle.com>
parents: 817
diff changeset
    72
fi
9da22daff5a7 16400 exec_methods in distro constructor need to add the required parameter "timeout_seconds"
Keith Mitchell <keith.mitchell@oracle.com>
parents: 817
diff changeset
    73
9da22daff5a7 16400 exec_methods in distro constructor need to add the required parameter "timeout_seconds"
Keith Mitchell <keith.mitchell@oracle.com>
parents: 817
diff changeset
    74
$MOUNT -F hsfs -o ro ${misc_lofi_dev} /mnt/misc
660
d87123ecef4a 10039 Blocker for AI Bootable Media
Alok Aggarwal <Alok.Aggarwal@Sun.COM>
parents: 636
diff changeset
    75
if [ $? -ne 0 ]; then
1001
fa5c7a246a82 1351 combine listcd and listusb.
David Miner <dminer@opensolaris.org>
parents: 943
diff changeset
    76
	echo "Unable to mount /mnt/misc" > /dev/msglog
660
d87123ecef4a 10039 Blocker for AI Bootable Media
Alok Aggarwal <Alok.Aggarwal@Sun.COM>
parents: 636
diff changeset
    77
	exit $SMF_EXIT_ERR_FATAL
228
ce1adec5a11c 3634 live-fs-root needs to be enhanced for AI purposes
Jan Damborsky <jan.damborsky@sun.com>
parents: 182
diff changeset
    78
fi
51
fb1f0308a90b 20 SUNWslim-utils needs to move into slim gate
Virginia Wray <Virginia.Wray@Sun.COM>
parents:
diff changeset
    79
1001
fa5c7a246a82 1351 combine listcd and listusb.
David Miner <dminer@opensolaris.org>
parents: 943
diff changeset
    80
$MOUNT -F lofs -o ro /mnt/misc/opt /opt
fa5c7a246a82 1351 combine listcd and listusb.
David Miner <dminer@opensolaris.org>
parents: 943
diff changeset
    81
if [ $? -ne 0 ]; then
fa5c7a246a82 1351 combine listcd and listusb.
David Miner <dminer@opensolaris.org>
parents: 943
diff changeset
    82
	echo "Unable to mount /opt" > /dev/msglog
fa5c7a246a82 1351 combine listcd and listusb.
David Miner <dminer@opensolaris.org>
parents: 943
diff changeset
    83
	exit $SMF_EXIT_ERR_FATAL
51
fb1f0308a90b 20 SUNWslim-utils needs to move into slim gate
Virginia Wray <Virginia.Wray@Sun.COM>
parents:
diff changeset
    84
fi
fb1f0308a90b 20 SUNWslim-utils needs to move into slim gate
Virginia Wray <Virginia.Wray@Sun.COM>
parents:
diff changeset
    85
1001
fa5c7a246a82 1351 combine listcd and listusb.
David Miner <dminer@opensolaris.org>
parents: 943
diff changeset
    86
# Set up user home directories
fa5c7a246a82 1351 combine listcd and listusb.
David Miner <dminer@opensolaris.org>
parents: 943
diff changeset
    87
setup_user_dirs
51
fb1f0308a90b 20 SUNWslim-utils needs to move into slim gate
Virginia Wray <Virginia.Wray@Sun.COM>
parents:
diff changeset
    88
1001
fa5c7a246a82 1351 combine listcd and listusb.
David Miner <dminer@opensolaris.org>
parents: 943
diff changeset
    89
echo "Done mounting image" > /dev/msglog
51
fb1f0308a90b 20 SUNWslim-utils needs to move into slim gate
Virginia Wray <Virginia.Wray@Sun.COM>
parents:
diff changeset
    90
727
3d76804f6900 5209 Enhancements to the mkrepo script
Karen Tung <Karen.Tung@Sun.COM>
parents: 695
diff changeset
    91
#
3d76804f6900 5209 Enhancements to the mkrepo script
Karen Tung <Karen.Tung@Sun.COM>
parents: 695
diff changeset
    92
# All SMF services are imported and sevice profiles are applied to the
3d76804f6900 5209 Enhancements to the mkrepo script
Karen Tung <Karen.Tung@Sun.COM>
parents: 695
diff changeset
    93
# boot archive during image construction time.  However, the link
3d76804f6900 5209 Enhancements to the mkrepo script
Karen Tung <Karen.Tung@Sun.COM>
parents: 695
diff changeset
    94
# for the platform.xml service profile is not created because
3d76804f6900 5209 Enhancements to the mkrepo script
Karen Tung <Karen.Tung@Sun.COM>
parents: 695
diff changeset
    95
# we are unable to determine the platform on which the image will
1001
fa5c7a246a82 1351 combine listcd and listusb.
David Miner <dminer@opensolaris.org>
parents: 943
diff changeset
    96
# be booted during build time.  So, apply the platform profile now.
727
3d76804f6900 5209 Enhancements to the mkrepo script
Karen Tung <Karen.Tung@Sun.COM>
parents: 695
diff changeset
    97
#
3d76804f6900 5209 Enhancements to the mkrepo script
Karen Tung <Karen.Tung@Sun.COM>
parents: 695
diff changeset
    98
apply_platform_profile
3d76804f6900 5209 Enhancements to the mkrepo script
Karen Tung <Karen.Tung@Sun.COM>
parents: 695
diff changeset
    99
1001
fa5c7a246a82 1351 combine listcd and listusb.
David Miner <dminer@opensolaris.org>
parents: 943
diff changeset
   100
# Determine if remote access via ssh should be enabled
fa5c7a246a82 1351 combine listcd and listusb.
David Miner <dminer@opensolaris.org>
parents: 943
diff changeset
   101
livessh=`/sbin/devprop -s livessh`
660
d87123ecef4a 10039 Blocker for AI Bootable Media
Alok Aggarwal <Alok.Aggarwal@Sun.COM>
parents: 636
diff changeset
   102
1001
fa5c7a246a82 1351 combine listcd and listusb.
David Miner <dminer@opensolaris.org>
parents: 943
diff changeset
   103
if is_autoinstall; then
695
68b0dc3a8806 13537 transfer module keeps trying to contact an unreachable IPS server indefinitely
Alok Aggarwal <Alok.Aggarwal@Sun.COM>
parents: 660
diff changeset
   104
	# If requested, enable remote access via ssh
68b0dc3a8806 13537 transfer module keeps trying to contact an unreachable IPS server indefinitely
Alok Aggarwal <Alok.Aggarwal@Sun.COM>
parents: 660
diff changeset
   105
	if [ "$livessh" = "enable" ]; then
68b0dc3a8806 13537 transfer module keeps trying to contact an unreachable IPS server indefinitely
Alok Aggarwal <Alok.Aggarwal@Sun.COM>
parents: 660
diff changeset
   106
		# generate ssh keys
68b0dc3a8806 13537 transfer module keeps trying to contact an unreachable IPS server indefinitely
Alok Aggarwal <Alok.Aggarwal@Sun.COM>
parents: 660
diff changeset
   107
		/lib/svc/method/sshd -c
68b0dc3a8806 13537 transfer module keeps trying to contact an unreachable IPS server indefinitely
Alok Aggarwal <Alok.Aggarwal@Sun.COM>
parents: 660
diff changeset
   108
		# enable ssh server
68b0dc3a8806 13537 transfer module keeps trying to contact an unreachable IPS server indefinitely
Alok Aggarwal <Alok.Aggarwal@Sun.COM>
parents: 660
diff changeset
   109
		/usr/sbin/svcadm enable network/ssh
68b0dc3a8806 13537 transfer module keeps trying to contact an unreachable IPS server indefinitely
Alok Aggarwal <Alok.Aggarwal@Sun.COM>
parents: 660
diff changeset
   110
	fi
1001
fa5c7a246a82 1351 combine listcd and listusb.
David Miner <dminer@opensolaris.org>
parents: 943
diff changeset
   111
elif is_livecd; then
249
2990728f6693 Fix for bug #3785 - Add accessibility support to the 2008.11 live CD
wwalker@localhost
parents: 228
diff changeset
   112
	#
660
d87123ecef4a 10039 Blocker for AI Bootable Media
Alok Aggarwal <Alok.Aggarwal@Sun.COM>
parents: 636
diff changeset
   113
	# Set up the terminal correctly for prompting
51
fb1f0308a90b 20 SUNWslim-utils needs to move into slim gate
Virginia Wray <Virginia.Wray@Sun.COM>
parents:
diff changeset
   114
	#
fb1f0308a90b 20 SUNWslim-utils needs to move into slim gate
Virginia Wray <Virginia.Wray@Sun.COM>
parents:
diff changeset
   115
	TERM=sun-color
fb1f0308a90b 20 SUNWslim-utils needs to move into slim gate
Virginia Wray <Virginia.Wray@Sun.COM>
parents:
diff changeset
   116
	export TERM
93
9369a38c5aac 973 UI for language selection should be invoked during boot process
Jan Damborsky <Jan.Damborsky@Sun.COM>
parents: 59
diff changeset
   117
9369a38c5aac 973 UI for language selection should be invoked during boot process
Jan Damborsky <Jan.Damborsky@Sun.COM>
parents: 59
diff changeset
   118
	#
695
68b0dc3a8806 13537 transfer module keeps trying to contact an unreachable IPS server indefinitely
Alok Aggarwal <Alok.Aggarwal@Sun.COM>
parents: 660
diff changeset
   119
	# if requested via GRUB menu selection:
68b0dc3a8806 13537 transfer module keeps trying to contact an unreachable IPS server indefinitely
Alok Aggarwal <Alok.Aggarwal@Sun.COM>
parents: 660
diff changeset
   120
	#     enable ssh
68b0dc3a8806 13537 transfer module keeps trying to contact an unreachable IPS server indefinitely
Alok Aggarwal <Alok.Aggarwal@Sun.COM>
parents: 660
diff changeset
   121
	#     set keyboard layout to default of English
68b0dc3a8806 13537 transfer module keeps trying to contact an unreachable IPS server indefinitely
Alok Aggarwal <Alok.Aggarwal@Sun.COM>
parents: 660
diff changeset
   122
	#     set desktop language to default of English
68b0dc3a8806 13537 transfer module keeps trying to contact an unreachable IPS server indefinitely
Alok Aggarwal <Alok.Aggarwal@Sun.COM>
parents: 660
diff changeset
   123
	# else
68b0dc3a8806 13537 transfer module keeps trying to contact an unreachable IPS server indefinitely
Alok Aggarwal <Alok.Aggarwal@Sun.COM>
parents: 660
diff changeset
   124
	#     Ask user to configure Keyboard Layout and Desktop Language
660
d87123ecef4a 10039 Blocker for AI Bootable Media
Alok Aggarwal <Alok.Aggarwal@Sun.COM>
parents: 636
diff changeset
   125
	#
695
68b0dc3a8806 13537 transfer module keeps trying to contact an unreachable IPS server indefinitely
Alok Aggarwal <Alok.Aggarwal@Sun.COM>
parents: 660
diff changeset
   126
	if [ "$livessh" = "enable" ]; then
68b0dc3a8806 13537 transfer module keeps trying to contact an unreachable IPS server indefinitely
Alok Aggarwal <Alok.Aggarwal@Sun.COM>
parents: 660
diff changeset
   127
		/usr/sbin/set_lang default
68b0dc3a8806 13537 transfer module keeps trying to contact an unreachable IPS server indefinitely
Alok Aggarwal <Alok.Aggarwal@Sun.COM>
parents: 660
diff changeset
   128
		/usr/bin/kbd -s US-English
68b0dc3a8806 13537 transfer module keeps trying to contact an unreachable IPS server indefinitely
Alok Aggarwal <Alok.Aggarwal@Sun.COM>
parents: 660
diff changeset
   129
		/usr/sbin/svcadm enable network/ssh
68b0dc3a8806 13537 transfer module keeps trying to contact an unreachable IPS server indefinitely
Alok Aggarwal <Alok.Aggarwal@Sun.COM>
parents: 660
diff changeset
   130
	else
68b0dc3a8806 13537 transfer module keeps trying to contact an unreachable IPS server indefinitely
Alok Aggarwal <Alok.Aggarwal@Sun.COM>
parents: 660
diff changeset
   131
		#
1001
fa5c7a246a82 1351 combine listcd and listusb.
David Miner <dminer@opensolaris.org>
parents: 943
diff changeset
   132
		# Determine if we should beep to let users with visual
fa5c7a246a82 1351 combine listcd and listusb.
David Miner <dminer@opensolaris.org>
parents: 943
diff changeset
   133
		# impairments know that they are being queried for information.
fa5c7a246a82 1351 combine listcd and listusb.
David Miner <dminer@opensolaris.org>
parents: 943
diff changeset
   134
		#
fa5c7a246a82 1351 combine listcd and listusb.
David Miner <dminer@opensolaris.org>
parents: 943
diff changeset
   135
		assistive_tech=`/sbin/devprop -s assistive_tech`
fa5c7a246a82 1351 combine listcd and listusb.
David Miner <dminer@opensolaris.org>
parents: 943
diff changeset
   136
fa5c7a246a82 1351 combine listcd and listusb.
David Miner <dminer@opensolaris.org>
parents: 943
diff changeset
   137
		#
695
68b0dc3a8806 13537 transfer module keeps trying to contact an unreachable IPS server indefinitely
Alok Aggarwal <Alok.Aggarwal@Sun.COM>
parents: 660
diff changeset
   138
		# Ask user to configure Keyboard Layout
68b0dc3a8806 13537 transfer module keeps trying to contact an unreachable IPS server indefinitely
Alok Aggarwal <Alok.Aggarwal@Sun.COM>
parents: 660
diff changeset
   139
		#
68b0dc3a8806 13537 transfer module keeps trying to contact an unreachable IPS server indefinitely
Alok Aggarwal <Alok.Aggarwal@Sun.COM>
parents: 660
diff changeset
   140
		if [ "x$assistive_tech" != "x" ] ; then
68b0dc3a8806 13537 transfer module keeps trying to contact an unreachable IPS server indefinitely
Alok Aggarwal <Alok.Aggarwal@Sun.COM>
parents: 660
diff changeset
   141
			printf "\\a"
68b0dc3a8806 13537 transfer module keeps trying to contact an unreachable IPS server indefinitely
Alok Aggarwal <Alok.Aggarwal@Sun.COM>
parents: 660
diff changeset
   142
		fi
803
7034e6f1050d 15456 text install images with the default manifest don't build after push for 13276
Alok Aggarwal <alok.aggarwal@oracle.com>
parents: 793
diff changeset
   143
		/usr/bin/kbd -s </dev/console >/dev/console 2>&1
660
d87123ecef4a 10039 Blocker for AI Bootable Media
Alok Aggarwal <Alok.Aggarwal@Sun.COM>
parents: 636
diff changeset
   144
695
68b0dc3a8806 13537 transfer module keeps trying to contact an unreachable IPS server indefinitely
Alok Aggarwal <Alok.Aggarwal@Sun.COM>
parents: 660
diff changeset
   145
		#
68b0dc3a8806 13537 transfer module keeps trying to contact an unreachable IPS server indefinitely
Alok Aggarwal <Alok.Aggarwal@Sun.COM>
parents: 660
diff changeset
   146
		# Ask user to configure Language
68b0dc3a8806 13537 transfer module keeps trying to contact an unreachable IPS server indefinitely
Alok Aggarwal <Alok.Aggarwal@Sun.COM>
parents: 660
diff changeset
   147
		#
68b0dc3a8806 13537 transfer module keeps trying to contact an unreachable IPS server indefinitely
Alok Aggarwal <Alok.Aggarwal@Sun.COM>
parents: 660
diff changeset
   148
		if [ "x$assistive_tech" != "x" ] ; then
68b0dc3a8806 13537 transfer module keeps trying to contact an unreachable IPS server indefinitely
Alok Aggarwal <Alok.Aggarwal@Sun.COM>
parents: 660
diff changeset
   149
			printf "\\a"
68b0dc3a8806 13537 transfer module keeps trying to contact an unreachable IPS server indefinitely
Alok Aggarwal <Alok.Aggarwal@Sun.COM>
parents: 660
diff changeset
   150
		fi
803
7034e6f1050d 15456 text install images with the default manifest don't build after push for 13276
Alok Aggarwal <alok.aggarwal@oracle.com>
parents: 793
diff changeset
   151
		/usr/sbin/set_lang </dev/console >/dev/console 2>&1
249
2990728f6693 Fix for bug #3785 - Add accessibility support to the 2008.11 live CD
wwalker@localhost
parents: 228
diff changeset
   152
	fi
695
68b0dc3a8806 13537 transfer module keeps trying to contact an unreachable IPS server indefinitely
Alok Aggarwal <Alok.Aggarwal@Sun.COM>
parents: 660
diff changeset
   153
1001
fa5c7a246a82 1351 combine listcd and listusb.
David Miner <dminer@opensolaris.org>
parents: 943
diff changeset
   154
	# Adjust X configuration or disable gdm based on boot properties
fa5c7a246a82 1351 combine listcd and listusb.
David Miner <dminer@opensolaris.org>
parents: 943
diff changeset
   155
	livemode=`/sbin/devprop -s livemode`
51
fb1f0308a90b 20 SUNWslim-utils needs to move into slim gate
Virginia Wray <Virginia.Wray@Sun.COM>
parents:
diff changeset
   156
	if [ "$livemode" = "text" ]; then
249
2990728f6693 Fix for bug #3785 - Add accessibility support to the 2008.11 live CD
wwalker@localhost
parents: 228
diff changeset
   157
		/usr/sbin/svcadm disable -t application/graphical-login/gdm
51
fb1f0308a90b 20 SUNWslim-utils needs to move into slim gate
Virginia Wray <Virginia.Wray@Sun.COM>
parents:
diff changeset
   158
	else
943
eaa8f2c70f20 6995479 media-fs-root should consume X server interface for VESA configuration
David Miner <dminer@opensolaris.org>
parents: 852
diff changeset
   159
		if [ "$livemode" = "vesa" ]; then
eaa8f2c70f20 6995479 media-fs-root should consume X server interface for VESA configuration
David Miner <dminer@opensolaris.org>
parents: 852
diff changeset
   160
			# Create SMF profile to force X to VESA
eaa8f2c70f20 6995479 media-fs-root should consume X server interface for VESA configuration
David Miner <dminer@opensolaris.org>
parents: 852
diff changeset
   161
			# Profile created so it persists on installed system 
eaa8f2c70f20 6995479 media-fs-root should consume X server interface for VESA configuration
David Miner <dminer@opensolaris.org>
parents: 852
diff changeset
   162
			cat <<EOF >/etc/svc/profile/site/x11_vesa.xml
eaa8f2c70f20 6995479 media-fs-root should consume X server interface for VESA configuration
David Miner <dminer@opensolaris.org>
parents: 852
diff changeset
   163
<?xml version='1.0'?>
eaa8f2c70f20 6995479 media-fs-root should consume X server interface for VESA configuration
David Miner <dminer@opensolaris.org>
parents: 852
diff changeset
   164
<!DOCTYPE service_bundle SYSTEM '/usr/share/lib/xml/dtd/service_bundle.dtd.1'>
eaa8f2c70f20 6995479 media-fs-root should consume X server interface for VESA configuration
David Miner <dminer@opensolaris.org>
parents: 852
diff changeset
   165
<!--
eaa8f2c70f20 6995479 media-fs-root should consume X server interface for VESA configuration
David Miner <dminer@opensolaris.org>
parents: 852
diff changeset
   166
    Service profile generated by installer to configure X to use the VESA driver
eaa8f2c70f20 6995479 media-fs-root should consume X server interface for VESA configuration
David Miner <dminer@opensolaris.org>
parents: 852
diff changeset
   167
-->
eaa8f2c70f20 6995479 media-fs-root should consume X server interface for VESA configuration
David Miner <dminer@opensolaris.org>
parents: 852
diff changeset
   168
<service_bundle type='profile' name='x11_vesa'
eaa8f2c70f20 6995479 media-fs-root should consume X server interface for VESA configuration
David Miner <dminer@opensolaris.org>
parents: 852
diff changeset
   169
	 xmlns:xi='http://www.w3.org/2003/XInclude' >
eaa8f2c70f20 6995479 media-fs-root should consume X server interface for VESA configuration
David Miner <dminer@opensolaris.org>
parents: 852
diff changeset
   170
  <service name='application/x11/x11-server' version='1' type='service'>
eaa8f2c70f20 6995479 media-fs-root should consume X server interface for VESA configuration
David Miner <dminer@opensolaris.org>
parents: 852
diff changeset
   171
    <property_group name="options" type="application">
eaa8f2c70f20 6995479 media-fs-root should consume X server interface for VESA configuration
David Miner <dminer@opensolaris.org>
parents: 852
diff changeset
   172
      <propval name="config_file" type="astring" value="xorg.conf.vesa"/>
eaa8f2c70f20 6995479 media-fs-root should consume X server interface for VESA configuration
David Miner <dminer@opensolaris.org>
parents: 852
diff changeset
   173
    </property_group>
eaa8f2c70f20 6995479 media-fs-root should consume X server interface for VESA configuration
David Miner <dminer@opensolaris.org>
parents: 852
diff changeset
   174
  </service>
eaa8f2c70f20 6995479 media-fs-root should consume X server interface for VESA configuration
David Miner <dminer@opensolaris.org>
parents: 852
diff changeset
   175
</service_bundle>
eaa8f2c70f20 6995479 media-fs-root should consume X server interface for VESA configuration
David Miner <dminer@opensolaris.org>
parents: 852
diff changeset
   176
EOF
eaa8f2c70f20 6995479 media-fs-root should consume X server interface for VESA configuration
David Miner <dminer@opensolaris.org>
parents: 852
diff changeset
   177
			# Apply profile now as media doesn't run manifest-import
eaa8f2c70f20 6995479 media-fs-root should consume X server interface for VESA configuration
David Miner <dminer@opensolaris.org>
parents: 852
diff changeset
   178
			/usr/sbin/svccfg apply \
eaa8f2c70f20 6995479 media-fs-root should consume X server interface for VESA configuration
David Miner <dminer@opensolaris.org>
parents: 852
diff changeset
   179
			    /etc/svc/profile/site/x11_vesa.xml
eaa8f2c70f20 6995479 media-fs-root should consume X server interface for VESA configuration
David Miner <dminer@opensolaris.org>
parents: 852
diff changeset
   180
		fi
51
fb1f0308a90b 20 SUNWslim-utils needs to move into slim gate
Virginia Wray <Virginia.Wray@Sun.COM>
parents:
diff changeset
   181
		/usr/sbin/svcadm enable application/graphical-login/gdm
fb1f0308a90b 20 SUNWslim-utils needs to move into slim gate
Virginia Wray <Virginia.Wray@Sun.COM>
parents:
diff changeset
   182
	fi
1001
fa5c7a246a82 1351 combine listcd and listusb.
David Miner <dminer@opensolaris.org>
parents: 943
diff changeset
   183
elif is_textinstall; then
773
cc0753f47d02 6367 Provide a text-installer for opensolaris
Keith Mitchell <keith.mitchell@sun.com>
parents: 727
diff changeset
   184
	# Get keyboard layout from user.
803
7034e6f1050d 15456 text install images with the default manifest don't build after push for 13276
Alok Aggarwal <alok.aggarwal@oracle.com>
parents: 793
diff changeset
   185
	/usr/bin/kbd -s </dev/console >/dev/console 2>&1
7034e6f1050d 15456 text install images with the default manifest don't build after push for 13276
Alok Aggarwal <alok.aggarwal@oracle.com>
parents: 793
diff changeset
   186
	/usr/sbin/set_lang </dev/console >/dev/console 2>&1
51
fb1f0308a90b 20 SUNWslim-utils needs to move into slim gate
Virginia Wray <Virginia.Wray@Sun.COM>
parents:
diff changeset
   187
fi
fb1f0308a90b 20 SUNWslim-utils needs to move into slim gate
Virginia Wray <Virginia.Wray@Sun.COM>
parents:
diff changeset
   188
660
d87123ecef4a 10039 Blocker for AI Bootable Media
Alok Aggarwal <Alok.Aggarwal@Sun.COM>
parents: 636
diff changeset
   189
exit $SMF_EXIT_OK