4 # SCCS: @(#)install-cde 1.3 95/03/14 SMI;
5 # Author: Eric Nielsen, SunSoft Inc, Mountain View, CA.
11 # Status: SunSoft CDE distributed
13 # (c) Copyright 1995, SunSoft Inc, all rights reserved.
15 # Description: This script installs SunSoft CDE 1.0
17 # ********************************************************************
18 # ********************************************************************
20 # The Function Help, which gives you general usage for sunsoft_src
23 # ********************************************************************
29 Usage:install-cde [flags]
30 [] (No flags invokes menu)
31 [ -loc <dir>] (Install location for /usr/dt )
32 [ -link ] ( Link to the current CDE install )
33 [ -ver ] (Install packages in interactive mode )
34 [ -noclean ] (Do not remove old packages before installation)
35 [ -nospace ] (Do not check available disk space)
36 [ -nocheck ] (Do not check for /usr/dt directory)
37 [ -nopatches ] (Do not install patches)
38 [ -nologin ] (Do not configure desktop login)
39 [ -remove ] (Remove all CDE packages)
40 [ -min ] (Install minimium CDE configuration)
41 [ -end ] (Install min and end-usr CDE configuration)
42 [ -dev ] (Install min, end-usr and developer configuration)
43 [ -debug ] (Sets Ksh mode to -xv for debugging/logging)
44 [ -help ] (Displays this help message)
45 [ ? ] (Displays this help message)
47 Example: install-cde -loc /home/ericni/cde -ver -dev -nospace
49 Note: Flags can be in any order
55 # ********************************************************************
57 # Function which checks for enought space for packages
60 # ********************************************************************
67 if [ ! -d ${SDTHOME}/bin ]
69 mkdir -p ${SDTHOME}/bin
76 Error: Could not create $SDTHOME directory. Please verify that
77 you have root permission on the file system located
80 Hint: You most likely have an existing /usr/dt link which points to
81 a remote server. If you don't have root permission on
82 this server, you need to manually remove the this link
83 before running install-cde again.
86 Press <Enter> to exit..
91 echo "Error: $DATE: The mkdir -p on $SDTHOME command returned a none zero exit, the directory creation failed" >> $ADMIN_LOG
99 if [ $CLEAN == "YES" ]
101 echo "Cleaning up any existing CDE packages..."
102 if [ "${MIN}" == "YES" ]
104 pkg_del_list="${MIN_RM_PKGS}"
111 if [ "${END}" == "YES" ]
113 pkg_del_list="${MIN_RM_PKGS} ${END_RM_PKGS}"
117 if [ "${DEV}" == "YES" ]
119 pkg_del_list="${MIN_RM_PKGS} ${END_RM_PKGS} ${DEV_RM_PKGS}"
126 for pkg in $pkg_del_list
128 /bin/pkginfo -q ${pkg}.*
130 if [ $FOUNDPKG -eq 0 ]; then
131 if [ $VERT == "YES" ]; then
132 /usr/sbin/pkgrm $VERBOSE ${pkg}.* 2>&1 | tee -a $PKG_RM_LOG
134 /usr/sbin/pkgrm $VERBOSE ${pkg}.* 2>&1 | tee -a $PKG_RM_LOG | grep $pkg
142 if [ ! -d ${SDTHOME}/bin ]
144 mkdir -p ${SDTHOME}/bin
147 diskfree=`df -k ${SDTHOME}/bin | awk '{print $4}' | sed '/avail/d'`
148 if [ $diskfree -lt $SIZE ]
158 Error: $SDTHOME has only `expr $diskfree / 1000` Megabytes of space left,
159 you need `expr $SIZE / 1000` Megabytes for this cde cluster
161 Choose an alternate install location for /usr/dt, or free up
162 `expr $SIZE / 1000` Megabytes in $SDTHOME.
165 Press <Enter> to Exit...
170 echo "Error: $DATE: Not enough space in file system to install cde. " >> $ADMIN_LOG
181 # ********************************************************************
183 # Function which configures login
185 # ********************************************************************
193 if [ -f /usr/dt/bin/dtconfig ]
195 if [ $VERT == "YES" ]; then
197 /usr/dt/bin/dtconfig -e
200 /usr/dt/bin/dtconfig -e 2>&1 > /dev/null
203 if [ $DTCONFIG_RESULT -ne 0 ]
209 Error: Could not run /usr/dt/bin/dtconfig successfully. The install-cde
210 was unable to setup the Solaris desktop login.
212 Press <Enter> to exit..
217 echo "Error: $DATE: The install-cde script could not run dtconfig -e correctly" >> $ADMIN_LOG
226 # ********************************************************************
228 # Function which installs minimium CDE packages
230 # ********************************************************************
239 if [ $CDE_CHECK == "YES" ]
241 if [ -f /usr/dt/bin/dtlogin ]
247 Warning: This install program has detected a CDE dtlogin binary, located
248 at "/usr/dt/bin/dtlogin". If you choose to continue you will destory
249 any current version of CDE that might be present.
254 print -n "\tDo you wish to continue [Y]"
258 if [[ $response = `` ]] then response="Y"; fi
260 if [[ $response = "Y" || $response = "y" ]]
275 touch /usr/dt/tmp.install.file.$$
276 if [ `ls -l /usr/dt/tmp.install.file.$$ | grep root | wc -l` -eq 0 ]
278 rm /usr/dt/tmp.install.file.$$
283 Error: This machine does not appear to have root permission for
284 the filesystem located at: $SDTHOME
287 Hint: You most likely have an existing /usr/dt link which points to
288 a remote server. If you don't have root permission on
289 this server, you need to manually remove the this link
290 before running install-cde again.
293 Press <Enter> to exit..
298 echo "Error: $DATE: Can not create root permission files in $SDTHOME" >> $ADMIN_LOG
310 if [ "`uname -r`" == "5.5" ]
312 if [ ! -h /usr/dt/lib/libtt.so ]; then if [ ! -f /usr/dt/lib/libtt.so ]; then
320 pkglist="${MIN_PKGS} ${SUNWdtcor}"
321 COPYRIGHT_FIRST_TIME="YES"
335 Error: Can't find the cde-min package directory located on
336 the CDE cdrom. Be sure you execute this script
337 in the top directory of your CDE cdrom, where the
338 directories: cde-min, cde-end-user, cde-developer and
339 patches should be available.
341 Exit this install script and restart it from the correct
345 Press <Enter> to exit..
350 echo "Error: $DATE: Can not find the cde-min directory, to load min packages" >> $ADMIN_LOG
359 # ####################################################################
362 # Function which installs End User
364 # ####################################################################
369 if [ -d cde-end-user ]
371 pkglist="${END_PKGS}"
384 Error: Can't find the cde-end-user package directory located on
385 the CDE cdrom. Be sure you execute this script
386 in the top directory of your CDE cdrom, where the
387 directories: cde-min, cde-end-user, cde-developer and
388 patches should be available.
390 Exit this install script and restart it from the correct
394 Press <Enter> to exit..
399 echo "Error: $DATE: Can not find the cde-end-user directory, to load end-usr packages" >> $ADMIN_LOG
407 # ********************************************************************
409 # Function which installs cde-developer packages
411 # ********************************************************************
416 if [ -d cde-developer ]
419 # If we are in 2.5, replace the SUNWmfman & SUNWmfdm if we have previously
420 # removed it in the create link function
424 if [ "`uname -r`" == "5.5" ]
426 if [ ! -f /usr/dt/share/man/man3/XmActivateProtocol.3x ]; then
434 pkglist="${DEV_PKGS} ${SUNWmfman} ${SUNWmfdm}"
447 Error: Can't find the cde-developer package directory located on
448 the CDE cdrom. Be sure you execute this script
449 in the top directory of your CDE cdrom, where the
450 directories: cde-min, cde-end-user, cde-developer and
451 patches should be available.
453 Exit this install script and restart it from the correct
457 Press <Enter> to exit..
462 echo "Error: $DATE: Can not find the cde-developer directory, to load end-usr packages" >> $ADMIN_LOG
470 # ********************************************************************
472 # Function which adds packages
475 # ********************************************************************
484 Warning: This remove program will remove all the CDE packages from
490 print -n "\tDo you wish to continue [Y]"
494 if [[ $response = `` ]] then response="Y"; fi
496 if [[ $response = "Y" || $response = "y" ]] then
503 pkglist="${MIN_RM_PKGS} ${END_RM_PKGS} ${DEV_RM_PKGS}"
506 if [ -f /usr/dt/bin/dtconfig ]
508 /usr/dt/bin/dtconfig -e 2>&1 > /dev/null
511 echo "Starting to Remove Packages..."
518 /bin/pkginfo -q ${pkg}.*
520 if [ $FOUNDPKG -eq 0 ]; then
521 if [ $VERT == "YES" ]; then
522 /usr/sbin/pkgrm $VERBOSE ${pkg}.* 2>&1 | tee -a $PKG_RM_LOG
524 /usr/sbin/pkgrm $VERBOSE ${pkg}.* 2>&1 | tee -a $PKG_RM_LOG | grep $pkg
532 # ********************************************************************
534 # Function which adds packages
537 # ********************************************************************
543 if [ $COPYRIGHT_FIRST_TIME == "YES" ]; then
544 echo "Starting Install ....."
548 if [ $COPYRIGHT_FIRST_TIME == "YES" ]; then
549 /usr/sbin/pkgadd $VERBOSE -d `pwd` $pkg 2>&1 | tee -a $PKG_LOG
550 if [ $? -ne 0 ] ; then
552 echo $ERROR_LINE >> $ADMIN_LOG
554 COPYRIGHT_FIRST_TIME="NO"
556 else if [ "$COPYRIGHT_FIRST_TIME" == "NO" ] ; then
557 if [ $VERT == "YES" ] ; then
558 /usr/sbin/pkgadd $VERBOSE -d `pwd` $pkg 2>&1 | tee -a $PKG_LOG
560 /usr/sbin/pkgadd $VERBOSE -d `pwd` $pkg 2>&1 | tee -a $PKG_LOG | grep $pkg
569 # ********************************************************************
571 # Function which sets install options
573 # ********************************************************************
585 4. Set Install Options [ Current ] [ New ]
588 print -n " Install Location: [ $SDTHOME ] [ ]\b\b"
592 if [ "${NEW_SDTHOME}" == "" ]
594 NEW_SDTHOME="/usr/dt"
597 firstchar=`echo $NEW_SDTHOME | cut -c1`
598 if [ "$firstchar" != "/" ]
602 echo "\tError: \t $NEW_SDTHOME is not an absolute path, please try again "
605 echo "\t\tPress <Enter> to continue...."
612 print -n " Remove Old CDE Packages: [ $CLEAN ] [ ]\b\b"
616 if [ "${NEW_CLEAN}" != "YES" ] ; then if [ "${NEW_CLEAN}" != "NO" ] ; then if [ "${NEW_CLEAN}" != "" ]
620 echo "\tError: \t You must answer YES or NO , please try again "
623 echo "\t\tPress <Enter> to continue...."
630 if [ "$NEW_CLEAN" == "" ]
637 print -n " Interactive Installation [ $VERT ] [ ]\b\b"
641 if [ "${NEW_VERT}" != "YES" ] ; then if [ "${NEW_VERT}" != "NO" ] ; then if [ "${NEW_VERT}" != "" ]
645 echo "\tError: \t You must answer YES or NO , please try again "
648 echo "\t\tPress <Enter> to continue...."
655 if [ "${NEW_VERT}" == "" ]
658 VERBOSE="-n -a /tmp/admin.$$"
661 if [ $VERT == "YES" ]; then VERBOSE="" ; fi
662 if [ $VERT == "NO" ]; then VERBOSE="-n -a /tmp/admin.$$" ; fi
665 print " Solaris Desktop Login "
666 print -n " at System Boot: [ $DTLOGIN ] [ ]\b\b"
671 if [ "${NEW_DTLOGIN}" != "YES" ] ; then if [ "${NEW_DTLOGIN}" != "NO" ] ; then if [ "${NEW_DTLOGIN}" != "" ]
675 echo "\tError: \t You must answer YES or NO , please try again "
678 echo "\t\tPress <Enter> to continue...."
685 if [ "$NEW_DTLOGIN" == "" ]
695 # ********************************************************************
697 # Function which creates the new install location link
699 # ********************************************************************
702 function CreateTheLink
710 if [ "`uname -r`" == "5.5" ]
712 S_R="SUNWdtcor SUNWmfrun SUNWmfman SUNWmfdm"
715 echo "Cleaning up Solaris 2.5 $i package from /usr/dt ..."
716 if [ $VERT == "YES" ]; then
717 /usr/sbin/pkgrm $VERBOSE ${i}.* 2>&1 | tee -a $PKG_RM_LOG | grep -v no
719 /usr/sbin/pkgrm $VERBOSE ${i}.* 2>&1 | tee -a $PKG_RM_LOG | grep $i | grep -v no
729 find /usr/dt -depth -exec /bin/rmdir {} 2>&1 > /dev/null \; 2>&1 > /dev/null
734 /usr/bin/rm /usr/dt 2>&1 > /dev/null
745 Warning: A "/usr/dt" directory still exists on this machine, this
746 prohibits a needed link from being setup from
750 This installation can move the current /usr/dt to
752 /usr/dt.pre.CDE.${DATE}
754 and proceed with the installation.
757 Do you want to move your current /usr/dt
765 print -n "\tMove existing /usr/dt directory [Y]"
769 if [[ $response = `` ]] then response="Y"; fi
771 if [[ $response = "Y" || $response = "y" ]]
773 mv /usr/dt /usr/dt.pre.CDE.${DATE}
782 Error: Could not create $SDTHOME directory. Please verify that
783 you have root permission on the file system located
786 Hint: You most likely have an existing /usr/dt link which points to
787 a remote server. If you don't have root permission on
788 this server, you need to manually remove the this link
789 before running install-cde again.
792 Press <Enter> to exit..
799 ln -s ${SDTHOME} /usr/dt
806 Error: Could not create alternate link from /usr/dt to $SDTHOME ,
807 please verfy you have root permission on the file systems
810 Hint: You most likely have an existing /usr/dt link which points to
811 a remote server. If you don't have root permission on
812 this server, you need to manually remove the this link
813 before running install-cde again.
816 Press <Enter> to exit..
822 echo "Error: $DATE: The ln -s $SDTHOME command returned a none zero exit, the link failed" >> $ADMIN_LOG
846 Warning: A "/usr/dt" file still exists on this machine, this
847 prohibits a needed link from being setup from
851 This installation can move the current /usr/dt to
853 /usr/dt.pre.CDE.${DATE}
855 and proceed with the installation.
857 Do you want to move your current /usr/dt
865 print -n "\tMove existing /usr/dt file [Y]"
869 if [[ $response = `` ]] then response="Y"; fi
871 if [[ $response = "Y" || $response = "y" ]]
873 mv /usr/dt /usr/dt.pre.CDE.${DATE}
881 Error: Could not create $SDTHOME directory. Please verify you have
882 you have root permission on the file systems in question.
885 Hint: You most likely have an existing /usr/dt link which points to
886 a remote server. If you don't have root permission on
887 this server, you need to manually remove the this link
888 before running install-cde again.
891 Press <Enter> to exit..
898 ln -s ${SDTHOME} /usr/dt
905 Error: Could not create alternate link from /usr/dt to $SDTHOME ,
906 please verfy you have root permission on the file systems
909 Hint: You most likely have an existing /usr/dt link which points to
910 a remote server. If you don't have root permission on
911 this server, you need to manually remove the this link
912 before running install-cde again.
915 Press <Enter> to exit..
921 echo "Error: $DATE: The ln -s $SDTHOME command returned a none zero exit, the link faile
940 ln -s ${SDTHOME} /usr/dt
947 Error: Could not create alternate link from /usr/dt to $SDTHOME ,
948 please verfy you have root permission on the file systems
953 Hint: You most likely have an existing /usr/dt link which points to
954 a remote server. If you don't have root permission on
955 this server, you need to manually remove the this link
956 before running install-cde again.
959 Press <Enter> to exit..
964 echo "Error: $DATE: The ln -s $SDTHOME command returned a none zero exit, the link failed" >> $ADMIN_LOG
968 touch /usr/dt/tmp.install.file.$$
969 if [ `ls -l /usr/dt/tmp.install.file.$$ | grep root | wc -l` -eq 0 ]
971 rm /usr/dt/tmp.install.file.$$
977 Error: This machine does not appear to have root permission for
978 the filesystem located at: $SDTHOME
980 Hint: You most likely have an existing /usr/dt link which points to
981 a remote server. If you don't have root permission on
982 this server, you need to manually remove the this link
983 before running install-cde again.
986 Press <Enter> to exit..
991 echo "Error: $DATE: The ln -s $SDTHOME command returned a none zero exit, the link failed" >> $ADMIN_LOG
996 rm /usr/dt/tmp.install.file.$$
1004 # ********************************************************************
1006 # Checks Root permission in /usr/dt file system
1008 # ********************************************************************
1015 touch /usr/dt/tmp.install.file.$$
1016 if [ `ls -l /usr/dt/tmp.install.file.$$ | grep root | wc -l` -eq 0 ]
1018 rm /usr/dt/tmp.install.file.$$
1023 Error: This machine does not appear to have root permission for
1024 the filesystem located at: $SDTHOME
1026 Hint: You most likely have an existing /usr/dt link which points to
1027 a remote server. If you don't have root permission on
1028 this server, you need to manually remove the this link
1029 before running install-cde again.
1033 Press <Enter> to exit..
1038 echo "Error: $DATE: Can not create root permission files in $SDTHOME" >> $ADMIN_LOG
1043 rm /usr/dt/tmp.install.file.$$
1049 # ********************************************************************
1051 # Install Min Cluster Pathces
1053 # ********************************************************************
1058 case "X$(uname -r)" in
1061 MIN_PATCHES_sparc=""
1064 PATCHES=MIN_PATCHES_${PLATFORM}
1075 # ********************************************************************
1077 # Install End Cluster Patches
1079 # ********************************************************************
1085 case "X$(uname -r)" in
1088 END_PATCHES_sparc="101925-02"
1089 END_PATCHES_x86="101926-02"
1091 if [ $PLATFORM == "sparc" ]
1093 PATCHES=$END_PATCHES_sparc
1095 PATCHES=$END_PATCHES_x86
1104 if [ -d Patches/${PLATFORM}/${i} ]
1107 if [ `showrev -p | /usr/bin/cut -d" " -f1,2 | grep $i | wc -l` -eq 0 ]
1109 Patches/${PLATFORM}/${PATCHES}/installpatch `pwd`/Patches/${PLATFORM}/${i} 2>&1 > /dev/null
1110 echo "INSTALLED PATCH ${i} "
1121 # ********************************************************************
1123 # Install Developer Cluster Patches
1125 # ********************************************************************
1129 case "X$(uname -r)" in
1132 DEV_PATCHES_sparc=""
1135 PATCHES=DEV_PATCHES_${PLATFORM}
1144 # ********************************************************************
1146 # Install CDE exit function
1148 # ********************************************************************
1160 if [ -f $ADMIN_LOG ]
1166 Note: A install-cde log which has error messages
1167 from the install-cde script can be found at:
1169 install-cde log: $ADMIN_LOG
1178 Note: A pkgadd log which contains a complete log of all the output
1179 from the "pkgadd" utility can be found at:
1181 pkgadd log: $PKG_LOG
1184 if [ -f $PKG_RM_LOG ]
1190 Note: A pkgrm log which contains a complete log of all the output
1191 from the "pkgrm" utility can be found at:
1193 pkgrm log: $PKG_RM_LOG
1196 if [ $INSTALL_GOOD == "YES" ]
1198 if [ $SEND_MAIL == "YES" ]
1201 VERSION=`grep DtVERSION_STRING cde-developer/SUNWdtinc/reloc/dt/share/include/Dt/Dt.h | awk -F\" '{print $2}'`
1202 SUBJECT=${VERSION}:${UNAME}
1203 if [ -x /usr/dist/exe/whatami ]
1205 /usr/dist/exe/whatami 2>&1 > /tmp/tmp.whatami.$$
1207 echo "NO /usr/dist/exe/whatami AVAILABLE" > /tmp/tmp.whatami.$$
1210 ( cd /tmp; mailx -s " $SUBJECT " -F cdeinstall@cde-www.Eng.Sun.COM /dev/null < /tmp/tmp.whatami.$$ 2>&1 > /dev/null )
1217 Note: CDE has been installed on this system, please reboot this
1218 machine before starting CDE
1225 The install-cde script has completed.
1235 # ********************************************************************
1239 # ********************************************************************
1248 /bin/mv /usr/dt /usr/dt.pre-install-cde.${DATE}
1251 ln -s `pwd`/dt /usr/dt
1258 Error: We could not find the dt directory, are you sure you
1259 are running install-cde from the correct directory.
1262 Press <Enter> to exit..
1268 echo "Error: $DATE: Could not find a dt directory to link to." >> $ADMIN_LOG
1276 # ****************************************************************************
1278 # * Determine if it is ok to remove SUNWtltk on 2.4
1280 # ***************************************************************************
1282 function Tooltalk_min
1286 case "X$(uname -r)" in
1289 if [ $CLEAN == "YES" ]; then
1291 TTPKG_LIST=`pkginfo | grep SUNWtltk | grep -v SUNWtltkd | grep -v SUNWtltkm | awk '{print $2 }'`
1292 for i in $TTPKG_LIST
1294 FOUNDPKG=`/bin/pkginfo -l $i | grep "VERSION" | grep "3.5" | wc -l`
1295 if [ $FOUNDPKG -ne 0 ]; then
1296 if [ $VERT == "YES" ]; then
1297 /usr/sbin/pkgrm $VERBOSE $i 2>&1 | tee -a $PKG_RM_LOG
1299 /usr/sbin/pkgrm $VERBOSE $i 2>&1 | tee -a $PKG_RM_LOG | grep $i
1307 if [ $REMOVE_TT_ONLY == "NO" ] ; then
1309 if [ $VERT == "YES" ] ; then
1310 /usr/sbin/pkgadd $VERBOSE -d `pwd` SUNWtltk 2>&1 | tee -a $PKG_LOG
1312 /usr/sbin/pkgadd $VERBOSE -d `pwd` SUNWtltk 2>&1 | tee -a $PKG_LOG | grep SUNWtltk
1326 # ****************************************************************************
1328 # * Determine if it is ok to remove SUNWtltkm, SUNWtltkd on 2.4
1330 # ***************************************************************************
1332 function Tooltalk_dev
1336 case "X$(uname -r)" in
1340 if [ $CLEAN == "YES" ]; then
1342 TTPKG_LIST=`pkginfo | grep SUNWtltkd | awk '{print $2 }'`
1343 for i in $TTPKG_LIST
1345 FOUNDPKG=`/bin/pkginfo -l $i | grep "VERSION" | grep "3.5" | wc -l`
1346 if [ $FOUNDPKG -ne 0 ]; then
1347 if [ $VERT == "YES" ]; then
1348 /usr/sbin/pkgrm $VERBOSE $i 2>&1 | tee -a $PKG_RM_LOG
1350 /usr/sbin/pkgrm $VERBOSE $i 2>&1 | tee -a $PKG_RM_LOG | grep $i
1357 if [ $REMOVE_TT_ONLY == "NO" ] ; then
1359 if [ $VERT == "YES" ] ; then
1360 /usr/sbin/pkgadd $VERBOSE -d `pwd` SUNWtltkd 2>&1 | tee -a $PKG_LOG
1362 /usr/sbin/pkgadd $VERBOSE -d `pwd` SUNWtltkd 2>&1 | tee -a $PKG_LOG | grep SUNWtltkd
1366 if [ $CLEAN == "YES" ]; then
1368 TTPKG_LIST=`pkginfo | grep SUNWtltkm | awk '{print $2 }'`
1369 for i in $TTPKG_LIST
1371 FOUNDPKG=`/bin/pkginfo -l $i | grep "VERSION" | grep "3.5" | wc -l`
1372 if [ $FOUNDPKG -ne 0 ]; then
1373 if [ $VERT == "YES" ]; then
1374 /usr/sbin/pkgrm $VERBOSE $i 2>&1 | tee -a $PKG_RM_LOG
1376 /usr/sbin/pkgrm $VERBOSE $i 2>&1 | tee -a $PKG_RM_LOG | grep $i
1382 if [ $REMOVE_TT_ONLY == "NO" ] ; then
1385 if [ $VERT == "YES" ] ; then
1386 /usr/sbin/pkgadd $VERBOSE -d `pwd` SUNWtltkm 2>&1 | tee -a $PKG_LOG
1388 /usr/sbin/pkgadd $VERBOSE -d `pwd` SUNWtltkm 2>&1 | tee -a $PKG_LOG | grep SUNWtltkm
1401 # ********************************************************************
1403 # Load Package Strings.
1406 # ********************************************************************
1407 function LoadStrings
1410 case "X$(uname -r)" in
1413 DEV_PKGS="SUNWdtinc SUNWdtma SUNWdtmad SUNWmfdm SUNWdthed SUNWdtab SUNWdtdem SUNWmfman"
1414 END_PKGS="SUNWdtwm SUNWdthe SUNWdthev SUNWdtdst SUNWdtim"
1415 MIN_PKGS="SUNWdtft SUNWdtdmn SUNWdtbas SUNWdticn SUNWdtdte SUNWmfrun"
1417 DEV_RM_PKGS="SUNWdtinc SUNWdtma SUNWdtmad SUNWmfdm SUNWmfdem SUNWdthed SUNWdtab SUNWdtdem SUNWmfman"
1418 END_RM_PKGS="SUNWdtwm SUNWdthe SUNWdthev SUNWdtdst SUNWdtim"
1419 MIN_RM_PKGS="SUNWdtft SUNWdtdmn SUNWdtbas SUNWdticn SUNWdtdte SUNWmfrun"
1426 if [ ! -h /usr/dt/lib/libtt.so ]; then if [ ! -f /usr/dt/lib/libtt.so ]; then
1433 /bin/pkginfo -q SUNWtltk.*
1435 if [ $FOUNDPKG -ne 0 ]; then
1445 DEV_PKGS="SUNWdtinc SUNWdtma SUNWdtmad SUNWdthed SUNWdtab SUNWdtdem ${SUNWtltkm} ${SUNWtltkd}"
1446 END_PKGS="SUNWdtwm SUNWdthe SUNWdthev SUNWdtdst SUNWdtim"
1447 MIN_PKGS="SUNWdtft SUNWdtdmn SUNWdtbas SUNWdticn ${SUNWdtcor} SUNWdtdte SUNWmfrun ${SUNWtltk}"
1449 DEV_RM_PKGS="SUNWdtinc SUNWdtma SUNWdtmad SUNWdthed SUNWdtab SUNWdtdem ${SUNWtltkm} ${SUNWtltkd}"
1450 END_RM_PKGS="SUNWdtwm SUNWdthe SUNWdthev SUNWdtdst SUNWdtim"
1451 MIN_RM_PKGS="SUNWdtft SUNWdtdmn SUNWdtbas SUNWdticn ${SUNWtltk} SUNWdtdte SUNWmfrun"
1458 Error: CDE 1.0 is only supported on SunOS 5.4 and 5.5
1461 Press <Enter> to exit..
1467 echo "Error: $DATE: Wrong OS version, uname -r did not return 5.4 or 5.5" >> $ADMIN_LOG
1475 # ********************************************************************
1477 # Check to be sure user is root
1479 # ********************************************************************
1481 USER=`/bin/id | grep root | wc -l`
1486 echo "You must be root to run this script"
1494 # ********************************************************************
1496 # Variable Initialization
1499 # ********************************************************************
1500 trap 'rm -f /tmp/admin.$$; rm -f tmp.whatami.$$; rm -f /usr/dt/tmp.install.file.$$; exit' INT QUIT TERM EXIT
1524 if [ $PLATFORM == "i386" ]
1529 DATE=`date '+%d%b%y-%H:%M:%S'`
1530 PATH=/bin:/usr/bin:/etc:/usr/bin
1531 ADMIN_LOG=/usr/tmp/SunSoft_CDE1.0_install.log.${DATE}
1532 PKG_RM_LOG=/usr/tmp/SunSoft_CDE1.0_pkgrm.log.${DATE}
1533 PKG_LOG=/usr/tmp/SunSoft_CDE1.0_pkgadd.log.${DATE}
1534 VERBOSE="-n -a /tmp/admin.$$"
1537 LINE="____________________________________________________________________________"
1539 cat >/tmp/admin.$$ <<EOF
1554 # ********************************************************************
1556 # Argument Processing
1559 # ********************************************************************
1563 HELP $1 # exit on error
1568 -loc) SDTHOME=$2; shift 2 ;; # install location for /usr/dt
1569 -link) LINKDIR=$2 ; LinkFunc ; exit ;;
1570 -noclean) CLEAN="NO"; shift ;;
1571 -nospace) CHECK="NO"; shift ;;
1572 -nocheck) CDE_CHECK="NO"; shift ;;
1573 -nopatches) PATCH="NO"; shift ;;
1574 -nologin) DTLOGIN="NO"; shift ;;
1575 -debug) DEBUG="set -xv"; shift ;;
1576 -remove) LoadStrings; RemoveCDE; exit ;;
1577 -help) HELP; exit ;;
1579 -ver) VERT="YES"; VERBOSE=""; shift ;;
1580 -min) MENU_SELECT="YES"; response="1"; shift ;;
1581 -end) MENU_SELECT="YES"; response="2"; shift ;;
1582 -dev) MENU_SELECT="YES"; response="3"; shift ;;
1583 *) HELP $1; shift ;; # exit on error
1588 # ********************************************************************
1590 # Place the selection Menu on the screen
1592 # ********************************************************************
1596 while [ $DONE = "NO" ]
1598 while [ $MENU_SELECT = "NO" ]
1607 Solaris Common Desktop Environment
1614 1. Minimum Installation
1620 3. Developer & End User
1623 4. Set Install Options
1625 Install Location: [ $SDTHOME ]
1626 Remove Old CDE Packages: [ $CLEAN ]
1627 Interactive Installation: [ $VERT ]
1628 Solaris Desktop Login
1629 at System Boot: [ $DTLOGIN ]
1631 0. Cancel Installation
1637 print -n "\tSELECT A NUMBER [2] "
1640 if [[ $response = `` ]] then response="2"; fi
1643 print -n "\tYou have selected \"$response\", is this Correct ? (Y/N) [Y]"
1646 if [[ $abort_chance = "Y" || $abort_chance = "y" ]] then
1649 if [[ $abort_chance = `` ]] then MENU_SELECT=YES; fi
1655 if [[ $MENU_SELECT = YES ]] then
1663 if [ $CHECK == "YES" ] ; then CheckDisk ; else DONE=YES; fi
1664 if [ $SDTHOME != "/usr/dt" ] ; then CreateTheLink ; else DONE=YES; fi
1665 if [ $DONE = "YES" ] ; then InstallMin ; fi
1666 if [ $PATCH = "YES" ] ; then MinPatch ; else DONE=YES; fi
1667 if [ $DTLOGIN = "YES" ] ; then RunDtconfig ; else DONE=YES; fi
1674 if [ $CHECK == "YES" ] ; then CheckDisk ; else DONE=YES; fi
1675 if [ $SDTHOME != "/usr/dt" ] ; then CreateTheLink ; else DONE=YES; fi
1676 if [ $DONE = "YES" ] ; then InstallMin ; fi
1677 if [ $DONE = "YES" ] ; then InstallEnd ; fi
1678 if [ $PATCH = "YES" ] ; then MinPatch ; else DONE=YES; fi
1679 if [ $PATCH = "YES" ] ; then EndPatch ; else DONE=YES; fi
1680 if [ $DTLOGIN = "YES" ] ; then RunDtconfig ; else DONE=YES; fi
1688 if [ $CHECK == "YES" ] ; then CheckDisk ; else DONE=YES; fi
1689 if [ $SDTHOME != "/usr/dt" ] ; then CreateTheLink ; else DONE=YES; fi
1690 if [ $DONE = "YES" ] ; then InstallMin ; fi
1691 if [ $DONE = "YES" ] ; then InstallEnd ; fi
1692 if [ $DONE = "YES" ] ; then InstallDev ; fi
1693 if [ $PATCH = "YES" ] ; then MinPatch ; else DONE=YES; fi
1694 if [ $PATCH = "YES" ] ; then EndPatch ; else DONE=YES; fi
1695 if [ $PATCH = "YES" ] ; then DevPatch ; else DONE=YES; fi
1696 if [ $DTLOGIN = "YES" ] ; then RunDtconfig ; else DONE=YES; fi
1711 print "\t\tI don't recogize..\"$response\" Sorry.. "
1725 # ********************************************************************
1729 ********************************************************************