if [ $ARCH != "sparc" ]; then
fi
ALL_PRODUCTS="jds=JDS Common Packages
jds-src=Sources for JDS Common Packages
gnome=GNOME 2.17 Desktop
gnome-src=GNOME 2.17 Source
mozilla=Mozilla 1.7 Web Browser
mozilla-src=Mozilla Source
firefox=Firefox Web Browser
firefox-src=Firefox Source
thunderbird=Thunderbird Email and News Client
thunderbird-src=Thunderbird Source
idn
idn-src
evolution=Evolution Email and Calendar
evolution-src=Evolution Source
glow=Integrated Collaboration Environment
jai=Java Advanced Imaging
jai-iio=Java Advanced Imaging
java=Java Runtime Environment
java-src
javaapps=Java Applications
javaapps-src=Java Applications Sources
java3d
jcs
jdk=Java Development Kit
jdic=Java Desktop Integration Components
jdnc=Java Desktop Network Components
jinput=Java Controller API
joal=Java bindings for OpenAL API
jogl=Java bindings for OpenGL API
l10n=Globalization Tools
l10n-src=Globalization Tools Sources
l10nmessages=Localized Messages
iiim=Input Method Switcher
iiim-src=Input Method Switcher Sources
muscle
plugins=Third Party Browser Plugins
plugins-src
scs-client
staroffice=StarOffice office suite
starsuite=StarSuite office suite
so-sdk=StarOffice Software Development Kit
updater
netbeans
javahelp
xserver=X.org server
nodist=Extra packages for JDS developers
nodist-src=Extra sources for JDS developers
apoc-daemon=APOC Daemon
apoc-daemon-src=APOC Daemon Sources
apoc-sol-$ARCH=APOC Configuration Manager
apoc-sol-$ARCH-src=APOC Configuration Manager Sources"
ALL_PATCHDIRS="patches-xserver=X server patches
patches-mozilla=Patches required for the Mozilla Web browser
patches-gnome=Patches required for the GNOME Desktop"
MYNAME="$0"
MYARGS="$*"
# ask "question" variable_name "default answer"
echo -n "$1"
if [ ! -z $3 ]; then
echo -n " [$3]: "
else
echo -n ": "
fi
read -e val
eval "$2=\"$3\""
else
eval "$2=\"$val\""
fi
}
# ask_yes_no "question" variable_name "default answer"
while [ $yes_no_repeat = yes ]; do
ask "${@}"
eval "the_ans=\"\$$2\""
if [ $? = 0 ]; then
eval "$2=yes"
return
fi
if [ $? = 0 ]; then
eval "$2=no"
return
fi
l10n_print "Please answer yes or no"
done
}
test -r $INFOFILE && \
}
IFS=' '
done
done
typeset -i n=0
if [ -n "${version1[$n]}" ]; then
if [ -n "${version2[$n]}" ]; then
return 0
else
return 1
fi
fi
else
return 1
fi
else
if [ -n "${version2[$n]}" ]; then
return 0
fi
return 1
fi
typeset n=$n+1
done
}
echo "%s [options]" "$0"
l10n_print "Install the Java Desktop System, GNOME 2.17, Solaris Edition"
l10n_print " -h, --help display this help"
l10n_print " --quiet, -q less verbose operation."
l10n_print " --force, -f ignore any errors and continue."
l10n_print " --ignore, -i ignore file conflicts and continue."
l10n_print " -n non-interactive installation."
l10n_print " -R rootdir install into an alternative root directory."
l10n_print " -p prod1,prod2,..."
l10n_print " select products for installation"
l10n_print " -a install all products"
l10n_print " --nopatch don't install OS patches"
l10n_print " --accept accept the license terms"
l10n_print " --tmpdir dir create temporary files in dir instead of /tmp"
exit 1
}
while [ $# != 0 ]; do
--help | -h )
;;
--quiet | -q )
;;
--force | -f )
;;
--ignore | -i )
;;
-R )
shift
ROOTDIR=$1
l10n_print "Option %s requires an argument" "-R"
fi
;;
-n )
;;
-a )
;;
--accept )
;;
-p )
shift
PRODUCTS="$1"
l10n_print "Option %s requires an argument" "-R"
fi
;;
--tmpdir )
shift
BASE_TEMPDIR="$1"
l10n_print "Option %s requires an argument" "--tmpdir"
fi
;;
--nopatch )
;;
* )
l10n_print "Error: %s: invalid argument" "$1"
;;
esac
shift
done
}
status_file=/tmp/.command_status.$$
rm -f $status_file
else
fi
rm -f $status_file
return $status
}
if [ -e "$1" ]; then
backup "$1~"
l10n_print "Saving file %s as %s~" "$1" "$1"
fi
}
fi
cd /
}
l10n_print "Interrupted."
exit 1
}
shift
}
msg_log "${@}"
exit 1
}
msg_log "${@}"
exit 1
fi
else
exit 1
fi
else
fi
}
test -f $LOGFILE || return
log_arg1="$1"
shift
}
l10n_print "${@}"
}
# check_disk_space directory minsize(kB)
dir_to_check="$ROOTDIR$1"
while [ ! -d $dir_to_check ]; do
done
if [ $freespace -le $2 ]; then
return 1
fi
return 0
}
# so_disk_space_check prodname
# Need large tmp area (>=1GB) for StarOffice/StarSuite installation.
check_disk_space $TEMPDIR 1048576 || \
msg_error "Your %s directory has less than 1GB free.\nYou need to specify an alternative temp dir with the --tmpdir switch." "$BASE_TEMPDIR"
}
if [ $? != 0 ]; then
msg_fatal "Only root can install this product."
fi
trap clean_up_and_abort HUP INT TERM
else
trap clean_up_and_abort HUP INT TERM ERR
fi
}
mail=
instance=unique
runlevel=nocheck
setuid=nocheck
action=nocheck
partial=quit
idepend=nocheck
rdepend=nocheck
space=quit
EOF
if [ $IGNORE_CONFLICT = no ]; then
conflict=quit
EOF_2
else
conflict=nocheck
EOF_3
fi
}
IFS="
"
typeset -i i=0
MOUNT_POINTS[$i]="$mp"
MP_SUMS[$i]=0
typeset i=$i+1
done
}
# disk_usage_add <dir> <size>
typeset -i i=0
while [ $i -lt $MOUNT_POINT_COUNT ]; do
mpname=${MOUNT_POINTS[$i]}
case $1 in
${mpname}* )
break
;;
esac
typeset i=$i+1
done
}
typeset -i i=0
while [ $i -lt $MOUNT_POINT_COUNT ]; do
mpname=${MOUNT_POINTS[$i]}
msg_error "Your %s filesystem has less than %s kB free\nYou will not be able to install JDS." "$ROOTDIR$mpname" "$mpsize"
fi
typeset i=$i+1
done
}
#install_pkgs <dir>
if [ -r $ORDERFILE ]; then
export IFS=' '
else
fi
msg_error "No packages found."
return
fi
IFS='
'
# Remove old Mozilla 1.x packages.
if [ $1 == 'firefox' -o $1 == 'thunderbird' ]; then
moz_pkgs="SUNWmozspell
SUNWmozpsm
SUNWmoznss-devel
SUNWmoznss
SUNWmoznspr-devel
SUNWmozmail
SUNWmozjs-debugger
SUNWmozilla-devel
SUNWmozgm
SUNWmozdom-inspector
SUNWmozchat
SUNWmozilla
SUNWmoznspr
SUNWmoznav
SUNWthunderbird-devel"
done
fi
# Remove evolution-socs-connect packages as they are incompatible with
# evolution-jescs (connector for Java Enterprise System Calendar Server)
if [ $1 == 'evolution' ]; then
evo_pkgs="SUNWevolution-socs-connect
SUNWevolution-socs-connect-share"
done
fi
cd $TEMPDIR
continue
fi
if [ $? != 0 ]; then
continue
fi
if [ ! -d $pkg0 ]; then
continue
fi
l10n_print "Installing package %s" "$pkg0"
fi
else
fi
done
}
l10n_print "Uninstalling %s" "$1"
fi
msg_log "Uninstalling %s" "$1"
msg_error "ERROR: Failed to remove package %s" "$1"
else
msg_error "ERROR: Failed to remove package %s" "$1"
fi
}
$PKGINFO -q "$1.*"
}
IFS="
"
done
done
}
IFS="
"
for glob in $pkgs_to_remove; do
done
done
}
echo ",--------------------------------------------------------------------------"
echo "|"
echo "|"
1)
fi
do_install || return $?
break
;;
2)
custom_menu || return $?
;;
x|X)
return 2
;;
*)
l10n_print "Invalid selection"
sleep 1
esac
done
return 0
}
echo ",--------------------------------------------------------------------------"
fi
echo "|"
echo "|"
1)
do_install || return $?
return 1
;;
2)
select_product_menu || return $?
;;
3)
select_patchdir_menu || return $?
else
l10n_print "Invalid selection"
sleep 1
fi
;;
i|I)
do_install || return $?
return 1
;;
x|X)
return 2
;;
*)
l10n_print "Invalid selection"
sleep 1
esac
done
return 0
}
echo ",--------------------------------------------------------------------------"
echo "| 1) StarOffice"
echo "| 2) StarSuite"
echo "|"
echo "|"
1)
return 0
;;
2)
return 0
;;
x|X)
return 2
;;
*)
l10n_print "Invalid selection"
sleep 1
esac
done
return 0
}
IFS=,
echo ",--------------------------------------------------------------------------"
typeset -i N=1
for pdir in $PATCHDIRS; do
eval "plist=\"\$ALL_${pn}_PATCHES\""
eval "patch_${N}_list=\"$plist\""
res=$?
if [ $res = 0 ]; then
echo "| $n) [x] $pname"
eval "patch_${N}_selected=1"
elif [ $res = 1 ]; then
echo "| $n) [:] $pname"
eval "patch_${N}_selected=0"
else
echo "| $n) [ ] $pname"
eval "patch_${N}_selected=0"
fi
typeset N=$N+1
done
echo "|"
echo "|"
echo "|"
i|I)
do_install || return $?
return 1
;;
x|X)
return 2
;;
r|R)
return 0
;;
a|A)
;;
s|S)
select_patch_menu || return $?
;;
u|U)
;;
*)
eval "the_patches=\$patch_${menu_sel}_list"
l10n_print "Invalid selection"
sleep 1
else
eval "is_sel=\$patch_${menu_sel}_selected"
else
fi
fi
esac
done
}
IFS=,
for p in $1; do
test -z "$p" && continue
fi
eval "PATCH_DESC_${dummy}=\"$pdesc\""
cd /
cd $TEMPDIR
done
}
IFS=,
echo ",--------------------------------------------------------------------------"
typeset -i N=1
for ps in $ALL_PATCHES; do
eval "pname=\$PATCH_DESC_${pbn}"
eval "patch_${N}_name=\"$ps\""
res=$?
if [ $res = 0 ]; then
eval "patch_${N}_selected=1"
else
eval "patch_${N}_selected=0"
fi
typeset N=$N+1
done
echo "|"
echo "|"
echo "|"
i|I)
do_install || return $?
return 1
;;
x|X)
return 2
;;
r|R)
return 0
;;
a|A)
;;
s|S)
select_patch_menu || return $?
;;
u|U)
;;
*)
eval "the_patch=\$patch_${menu_sel}_name"
l10n_print "Invalid selection"
sleep 1
else
eval "is_sel=\$patch_${menu_sel}_selected"
else
fi
fi
esac
done
}
IFS="
"
echo ",--------------------------------------------------------------------------"
typeset -i N=1
fi
eval "prod_${N}_name=\"$prod\""
if [ $? = 0 ]; then
eval "prod_${N}_selected=1"
else
eval "prod_${N}_selected=0"
fi
typeset N=$N+1
done
echo "|"
echo "|"
echo "|"
i|I)
do_install || return $?
return 1
;;
x|X)
return 2
;;
r|R)
return 0
;;
a|A)
;;
u|U)
;;
*)
eval "the_name=\$prod_${menu_sel}_name"
l10n_print "Invalid selection"
sleep 1
else
eval "is_sel=\$prod_${menu_sel}_selected"
else
fi
fi
esac
done
}
l10n_print "Installing patch %s" "$1"
fi
IFS=" "
else
fi
cd /
}
IFS=,
l10n_print "Installing required patches..."
fi
test -z "$p" && continue
# Skip if patch already applied.
# Remove 'T' t-patch prefix if present. showrev doesn't show it.
install_patch $p || \
msg_error "Failed to install patch %s" "$p"
fi
done
}
msg_fatal "No products selected."
fi
so_menu || return $?
else
msg_fatal "You cannot select both StarOffice and StarSuite"
fi
fi
l10n_print "Checking for sufficient disk space..."
IFS=,
msg_warning "WARNING: disk space usage information missing from directory %s" "$prod"
continue
fi
exec < "$prod/.pkgsize"
while read line; do
done
exec <& 1
done
l10n_print "Removing older versions of JDS packages..."
l10n_print "Determining package installation order..."
IFS=,
msg_warning "Product %s not found in the install image" "$prod"
continue
fi
fi
echo
echo -------------------------------------------------
fi
l10n_print "Installing Product \"%s\"" "$lprodname"
fi
# if [ -r "$MYDIR/$prod/.remove-if-older" ]; then
# remove_if_older $prod
# fi
done
}
}
# Examine LANG variable to determine whether to select StarOffice or StarSuite.
then
# Japan, China, Taiwan and Korean get StarSuite.
esac
fi
# If not set assume it is not Asian and therefore use StarOffice.
return 1
}
test -z "$1" && return 1
if [ $? != 0 ]; then
fi
}
test -z "$1" && return 1
if [ $? = 0 ]; then
fi
}
IFS="
"
done
done
}
IFS="
"
IFS=,
test ! -d $MYDIR/$prod && unselect_product $prod
done
# Decide between StarOffice and StarSuite and unselect the other if
# it is selected.
# FIXME: Disable for now as it will not be needed on final media.
# staroffice_or_starsuite
# if [ $? -eq 1 ]
# then
# product_is_selected starsuite && unselect_product starsuite
# else
# product_is_selected staroffice && unselect_product staroffice
# fi
}
IFS='
'
sed -e 's% %,%g'
return 0
fi
if [ $? != 0 ]; then
return 0
else
return 1
fi
}
IFS="
"
IFS=,
eval "ALL_${dname}_PATCHES=\"$dummy\""
fi
done
}
}
test -z "$1" && return 1
IFS=,
for p in $1; do
if [ $? != 0 ]; then
fi
done
}
test -z "$1" && return 1
IFS=,
for p in $1; do
if [ $? = 0 ]; then
fi
done
}
test -z "$1" && return 2
IFS=,
for p in $1; do
patch_is_selected $p && have_selected=yes || have_unselected=yes
done
return 1
fi
return 0
fi
return 2
}
l10n_print "You are about to install Sun Java Desktop System, GNOME 2.17.\nThis install will replace any old versions of the following\nproducts you may have installed on your system with the newer\nversion included in JDS: GNOME, Mozilla and Java\nMedia Framework. It may also replace the installed version\nof Java 1.4.2 if it is older than the version included in JDS."
fi
}
if [ ! -z $LC_MESSAGES ] ; then
elif [ ! -z $LC_ALL ] ; then
elif [ ! -z $LANG ] ; then
fi
lic_file="$MYDIR/.install/$language_territory_locale/license.txt"
lic_file="$MYDIR/.install/$language_terittory/license.txt"
lic_file="$MYDIR/.install/$language/license.txt"
fi
echo "WARNING: license file missing"
fi
return
fi
l10n_print "Before installing you must first accept the following license"
echo
l10n_print "Press [ENTER] to view the license"
read dummy
ask "`l10n_print 'Type \"Accept\" to accept the license\nand install Sun Java Desktop System GNOME 2.17'`" ans_accept
if [ $? != 0 ]; then
l10n_print "Installation aborted"
exit 1
fi
else
l10n_print "In non-interactive mode, you must use the --accept option\nto accept the license terms"
exit 1
fi
}
process_options "${@}"
fi
fi
main_menu || return $?
else
fi
do_install || return $?
fi
}
l10n_print "This product requires a %s system" "$REQ_SYSTEM"
exit 1
fi
l10n_print "This product requires a %s architecture system" "$REQ_ARCH"
exit 1
fi
if [ -n "$REQ_RELEASE" ]; then
if [ $? = 0 ]; then
l10n_print "This product requires OS release %s or later" "$REQ_RELEASE"
exit 1
fi
fi
if [ $? = 0 ]; then
l10n_print "This product requires OS build %s or later" "$REQ_KERNELID"
l10n_print ""
l10n_print "You may choose to continue the installation and risk that"
l10n_print "some or all of the functionality may not be available."
exit 1
fi
fi
fi
main "${@}"
if [ $? = 2 ]; then
msg_fatal "Installation aborted"
fi
l10n_print "Completed with warnings. Some packages may not be installed."
else
l10n_print "Successfully installed all packages."
fi
l10n_print "Installation log saved in %s" "$LOGFILE"
echo
l10n_print "You must now reboot your computer before using the Java Desktop System"