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
432 if [ ! -f /usr/dt/share/examples/motif/dogs/Dog.c ]; then
440 pkglist="${DEV_PKGS} ${SUNWmfman} ${SUNWmfdm}"
453 Error: Can't find the cde-developer package directory located on
454 the CDE cdrom. Be sure you execute this script
455 in the top directory of your CDE cdrom, where the
456 directories: cde-min, cde-end-user, cde-developer and
457 patches should be available.
459 Exit this install script and restart it from the correct
463 Press <Enter> to exit..
468 echo "Error: $DATE: Can not find the cde-developer directory, to load end-usr packages" >> $ADMIN_LOG
476 # ********************************************************************
478 # Function which adds packages
481 # ********************************************************************
490 Warning: This remove program will remove all the CDE packages from
496 print -n "\tDo you wish to continue [Y]"
500 if [[ $response = `` ]] then response="Y"; fi
502 if [[ $response = "Y" || $response = "y" ]] then
509 pkglist="${MIN_RM_PKGS} ${END_RM_PKGS} ${DEV_RM_PKGS}"
512 if [ -f /usr/dt/bin/dtconfig ]
514 /usr/dt/bin/dtconfig -e 2>&1 > /dev/null
517 echo "Starting to Remove Packages..."
524 /bin/pkginfo -q ${pkg}.*
526 if [ $FOUNDPKG -eq 0 ]; then
527 if [ $VERT == "YES" ]; then
528 /usr/sbin/pkgrm $VERBOSE ${pkg}.* 2>&1 | tee -a $PKG_RM_LOG
530 /usr/sbin/pkgrm $VERBOSE ${pkg}.* 2>&1 | tee -a $PKG_RM_LOG | grep $pkg
538 # ********************************************************************
540 # Function which adds packages
543 # ********************************************************************
549 if [ $COPYRIGHT_FIRST_TIME == "YES" ]; then
550 echo "Starting Install ....."
554 if [ $COPYRIGHT_FIRST_TIME == "YES" ]; then
555 /usr/sbin/pkgadd $VERBOSE -d `pwd` $pkg 2>&1 | tee -a $PKG_LOG
556 if [ $? -ne 0 ] ; then
558 echo $ERROR_LINE >> $ADMIN_LOG
560 COPYRIGHT_FIRST_TIME="NO"
562 else if [ "$COPYRIGHT_FIRST_TIME" == "NO" ] ; then
563 if [ $VERT == "YES" ] ; then
564 /usr/sbin/pkgadd $VERBOSE -d `pwd` $pkg 2>&1 | tee -a $PKG_LOG
566 /usr/sbin/pkgadd $VERBOSE -d `pwd` $pkg 2>&1 | tee -a $PKG_LOG | grep $pkg
575 # ********************************************************************
577 # Function which sets install options
579 # ********************************************************************
591 4. Set Install Options [ Current ] [ New ]
594 print -n " Install Location: [ $SDTHOME ] [ ]\b\b"
598 if [ "${NEW_SDTHOME}" == "" ]
600 NEW_SDTHOME="/usr/dt"
603 firstchar=`echo $NEW_SDTHOME | cut -c1`
604 if [ "$firstchar" != "/" ]
608 echo "\tError: \t $NEW_SDTHOME is not an absolute path, please try again "
611 echo "\t\tPress <Enter> to continue...."
618 print -n " Remove Old CDE Packages: [ $CLEAN ] [ ]\b\b"
622 if [ "${NEW_CLEAN}" != "YES" ] ; then if [ "${NEW_CLEAN}" != "NO" ] ; then if [ "${NEW_CLEAN}" != "" ]
626 echo "\tError: \t You must answer YES or NO , please try again "
629 echo "\t\tPress <Enter> to continue...."
636 if [ "$NEW_CLEAN" == "" ]
643 print -n " Interactive Installation [ $VERT ] [ ]\b\b"
647 if [ "${NEW_VERT}" != "YES" ] ; then if [ "${NEW_VERT}" != "NO" ] ; then if [ "${NEW_VERT}" != "" ]
651 echo "\tError: \t You must answer YES or NO , please try again "
654 echo "\t\tPress <Enter> to continue...."
661 if [ "${NEW_VERT}" == "" ]
664 VERBOSE="-n -a /tmp/admin.$$"
667 if [ $VERT == "YES" ]; then VERBOSE="" ; fi
668 if [ $VERT == "NO" ]; then VERBOSE="-n -a /tmp/admin.$$" ; fi
671 print " Solaris Desktop Login "
672 print -n " at System Boot: [ $DTLOGIN ] [ ]\b\b"
677 if [ "${NEW_DTLOGIN}" != "YES" ] ; then if [ "${NEW_DTLOGIN}" != "NO" ] ; then if [ "${NEW_DTLOGIN}" != "" ]
681 echo "\tError: \t You must answer YES or NO , please try again "
684 echo "\t\tPress <Enter> to continue...."
691 if [ "$NEW_DTLOGIN" == "" ]
701 # ********************************************************************
703 # Function which creates the new install location link
705 # ********************************************************************
708 function CreateTheLink
716 if [ "`uname -r`" == "5.5" ]
718 S_R="SUNWdtcor SUNWmfrun SUNWmfman SUNWmfdm"
721 echo "Cleaning up Solaris 2.5 $i package from /usr/dt ..."
722 if [ $VERT == "YES" ]; then
723 /usr/sbin/pkgrm $VERBOSE ${i}.* 2>&1 | tee -a $PKG_RM_LOG | grep -v no
725 /usr/sbin/pkgrm $VERBOSE ${i}.* 2>&1 | tee -a $PKG_RM_LOG | grep $i | grep -v no
735 find /usr/dt -depth -exec /bin/rmdir {} 2>&1 > /dev/null \; 2>&1 > /dev/null
740 /usr/bin/rm /usr/dt 2>&1 > /dev/null
751 Warning: A "/usr/dt" directory still exists on this machine, this
752 prohibits a needed link from being setup from
756 This installation can move the current /usr/dt to
758 /usr/dt.pre.CDE.${DATE}
760 and proceed with the installation.
763 Do you want to move your current /usr/dt
771 print -n "\tMove existing /usr/dt directory [Y]"
775 if [[ $response = `` ]] then response="Y"; fi
777 if [[ $response = "Y" || $response = "y" ]]
779 mv /usr/dt /usr/dt.pre.CDE.${DATE}
788 Error: Could not create $SDTHOME directory. Please verify that
789 you have root permission on the file system located
792 Hint: You most likely have an existing /usr/dt link which points to
793 a remote server. If you don't have root permission on
794 this server, you need to manually remove the this link
795 before running install-cde again.
798 Press <Enter> to exit..
805 ln -s ${SDTHOME} /usr/dt
812 Error: Could not create alternate link from /usr/dt to $SDTHOME ,
813 please verfy you have root permission on the file systems
816 Hint: You most likely have an existing /usr/dt link which points to
817 a remote server. If you don't have root permission on
818 this server, you need to manually remove the this link
819 before running install-cde again.
822 Press <Enter> to exit..
828 echo "Error: $DATE: The ln -s $SDTHOME command returned a none zero exit, the link failed" >> $ADMIN_LOG
852 Warning: A "/usr/dt" file still exists on this machine, this
853 prohibits a needed link from being setup from
857 This installation can move the current /usr/dt to
859 /usr/dt.pre.CDE.${DATE}
861 and proceed with the installation.
863 Do you want to move your current /usr/dt
871 print -n "\tMove existing /usr/dt file [Y]"
875 if [[ $response = `` ]] then response="Y"; fi
877 if [[ $response = "Y" || $response = "y" ]]
879 mv /usr/dt /usr/dt.pre.CDE.${DATE}
887 Error: Could not create $SDTHOME directory. Please verify you have
888 you have root permission on the file systems in question.
891 Hint: You most likely have an existing /usr/dt link which points to
892 a remote server. If you don't have root permission on
893 this server, you need to manually remove the this link
894 before running install-cde again.
897 Press <Enter> to exit..
904 ln -s ${SDTHOME} /usr/dt
911 Error: Could not create alternate link from /usr/dt to $SDTHOME ,
912 please verfy you have root permission on the file systems
915 Hint: You most likely have an existing /usr/dt link which points to
916 a remote server. If you don't have root permission on
917 this server, you need to manually remove the this link
918 before running install-cde again.
921 Press <Enter> to exit..
927 echo "Error: $DATE: The ln -s $SDTHOME command returned a none zero exit, the link faile
946 ln -s ${SDTHOME} /usr/dt
953 Error: Could not create alternate link from /usr/dt to $SDTHOME ,
954 please verfy you have root permission on the file systems
959 Hint: You most likely have an existing /usr/dt link which points to
960 a remote server. If you don't have root permission on
961 this server, you need to manually remove the this link
962 before running install-cde again.
965 Press <Enter> to exit..
970 echo "Error: $DATE: The ln -s $SDTHOME command returned a none zero exit, the link failed" >> $ADMIN_LOG
974 touch /usr/dt/tmp.install.file.$$
975 if [ `ls -l /usr/dt/tmp.install.file.$$ | grep root | wc -l` -eq 0 ]
977 rm /usr/dt/tmp.install.file.$$
983 Error: This machine does not appear to have root permission for
984 the filesystem located at: $SDTHOME
986 Hint: You most likely have an existing /usr/dt link which points to
987 a remote server. If you don't have root permission on
988 this server, you need to manually remove the this link
989 before running install-cde again.
992 Press <Enter> to exit..
997 echo "Error: $DATE: The ln -s $SDTHOME command returned a none zero exit, the link failed" >> $ADMIN_LOG
1002 rm /usr/dt/tmp.install.file.$$
1010 # ********************************************************************
1012 # Checks Root permission in /usr/dt file system
1014 # ********************************************************************
1021 touch /usr/dt/tmp.install.file.$$
1022 if [ `ls -l /usr/dt/tmp.install.file.$$ | grep root | wc -l` -eq 0 ]
1024 rm /usr/dt/tmp.install.file.$$
1029 Error: This machine does not appear to have root permission for
1030 the filesystem located at: $SDTHOME
1032 Hint: You most likely have an existing /usr/dt link which points to
1033 a remote server. If you don't have root permission on
1034 this server, you need to manually remove the this link
1035 before running install-cde again.
1039 Press <Enter> to exit..
1044 echo "Error: $DATE: Can not create root permission files in $SDTHOME" >> $ADMIN_LOG
1049 rm /usr/dt/tmp.install.file.$$
1055 # ********************************************************************
1057 # Install Min Cluster Pathces
1059 # ********************************************************************
1064 case "X$(uname -r)" in
1067 MIN_PATCHES_sparc=""
1070 PATCHES=MIN_PATCHES_${PLATFORM}
1081 # ********************************************************************
1083 # Install End Cluster Patches
1085 # ********************************************************************
1091 case "X$(uname -r)" in
1094 END_PATCHES_sparc="101925-02"
1095 END_PATCHES_x86="101926-02"
1097 if [ $PLATFORM == "sparc" ]
1099 PATCHES=$END_PATCHES_sparc
1101 PATCHES=$END_PATCHES_x86
1110 if [ -d Patches/${PLATFORM}/${i} ]
1113 if [ `showrev -p | /usr/bin/cut -d" " -f1,2 | grep $i | wc -l` -eq 0 ]
1115 Patches/${PLATFORM}/${PATCHES}/installpatch `pwd`/Patches/${PLATFORM}/${i} 2>&1 > /dev/null
1116 echo "INSTALLED PATCH ${i} "
1127 # ********************************************************************
1129 # Install Developer Cluster Patches
1131 # ********************************************************************
1135 case "X$(uname -r)" in
1138 DEV_PATCHES_sparc=""
1141 PATCHES=DEV_PATCHES_${PLATFORM}
1150 # ********************************************************************
1152 # Install CDE exit function
1154 # ********************************************************************
1166 if [ -f $ADMIN_LOG ]
1172 Note: A install-cde log which has error messages
1173 from the install-cde script can be found at:
1175 install-cde log: $ADMIN_LOG
1184 Note: A pkgadd log which contains a complete log of all the output
1185 from the "pkgadd" utility can be found at:
1187 pkgadd log: $PKG_LOG
1190 if [ -f $PKG_RM_LOG ]
1196 Note: A pkgrm log which contains a complete log of all the output
1197 from the "pkgrm" utility can be found at:
1199 pkgrm log: $PKG_RM_LOG
1202 if [ $INSTALL_GOOD == "YES" ]
1204 if [ $SEND_MAIL == "YES" ]
1207 VERSION=`grep DtVERSION_STRING cde-developer/SUNWdtinc/reloc/dt/share/include/Dt/Dt.h | awk -F\" '{print $2}'`
1208 SUBJECT=${VERSION}:${UNAME}
1209 if [ -x /usr/dist/exe/whatami ]
1211 /usr/dist/exe/whatami 2>&1 > /tmp/tmp.whatami.$$
1213 echo "NO /usr/dist/exe/whatami AVAILABLE" > /tmp/tmp.whatami.$$
1216 ( cd /tmp; mailx -s " $SUBJECT " -F cdeinstall@cde-www.Eng.Sun.COM /dev/null < /tmp/tmp.whatami.$$ 2>&1 > /dev/null )
1223 Note: CDE has been installed on this system, please reboot this
1224 machine before starting CDE
1231 The install-cde script has completed.
1241 # ********************************************************************
1245 # ********************************************************************
1254 /bin/mv /usr/dt /usr/dt.pre-install-cde.${DATE}
1257 ln -s `pwd`/dt /usr/dt
1264 Error: We could not find the dt directory, are you sure you
1265 are running install-cde from the correct directory.
1268 Press <Enter> to exit..
1274 echo "Error: $DATE: Could not find a dt directory to link to." >> $ADMIN_LOG
1282 # ****************************************************************************
1284 # * Determine if it is ok to remove SUNWtltk on 2.4
1286 # ***************************************************************************
1288 function Tooltalk_min
1292 case "X$(uname -r)" in
1295 if [ $CLEAN == "YES" ]; then
1297 TTPKG_LIST=`pkginfo | grep SUNWtltk | grep -v SUNWtltkd | grep -v SUNWtltkm | awk '{print $2 }'`
1298 for i in $TTPKG_LIST
1300 FOUNDPKG=`/bin/pkginfo -l $i | grep "VERSION" | grep "3.5" | wc -l`
1301 if [ $FOUNDPKG -ne 0 ]; then
1302 if [ $VERT == "YES" ]; then
1303 /usr/sbin/pkgrm $VERBOSE $i 2>&1 | tee -a $PKG_RM_LOG
1305 /usr/sbin/pkgrm $VERBOSE $i 2>&1 | tee -a $PKG_RM_LOG | grep $i
1313 if [ $REMOVE_TT_ONLY == "NO" ] ; then
1315 if [ $VERT == "YES" ] ; then
1316 /usr/sbin/pkgadd $VERBOSE -d `pwd` SUNWtltk 2>&1 | tee -a $PKG_LOG
1318 /usr/sbin/pkgadd $VERBOSE -d `pwd` SUNWtltk 2>&1 | tee -a $PKG_LOG | grep SUNWtltk
1332 # ****************************************************************************
1334 # * Determine if it is ok to remove SUNWtltkm, SUNWtltkd on 2.4
1336 # ***************************************************************************
1338 function Tooltalk_dev
1342 case "X$(uname -r)" in
1346 if [ $CLEAN == "YES" ]; then
1348 TTPKG_LIST=`pkginfo | grep SUNWtltkd | awk '{print $2 }'`
1349 for i in $TTPKG_LIST
1351 FOUNDPKG=`/bin/pkginfo -l $i | grep "VERSION" | grep "3.5" | wc -l`
1352 if [ $FOUNDPKG -ne 0 ]; then
1353 if [ $VERT == "YES" ]; then
1354 /usr/sbin/pkgrm $VERBOSE $i 2>&1 | tee -a $PKG_RM_LOG
1356 /usr/sbin/pkgrm $VERBOSE $i 2>&1 | tee -a $PKG_RM_LOG | grep $i
1363 if [ $REMOVE_TT_ONLY == "NO" ] ; then
1365 if [ $VERT == "YES" ] ; then
1366 /usr/sbin/pkgadd $VERBOSE -d `pwd` SUNWtltkd 2>&1 | tee -a $PKG_LOG
1368 /usr/sbin/pkgadd $VERBOSE -d `pwd` SUNWtltkd 2>&1 | tee -a $PKG_LOG | grep SUNWtltkd
1372 if [ $CLEAN == "YES" ]; then
1374 TTPKG_LIST=`pkginfo | grep SUNWtltkm | awk '{print $2 }'`
1375 for i in $TTPKG_LIST
1377 FOUNDPKG=`/bin/pkginfo -l $i | grep "VERSION" | grep "3.5" | wc -l`
1378 if [ $FOUNDPKG -ne 0 ]; then
1379 if [ $VERT == "YES" ]; then
1380 /usr/sbin/pkgrm $VERBOSE $i 2>&1 | tee -a $PKG_RM_LOG
1382 /usr/sbin/pkgrm $VERBOSE $i 2>&1 | tee -a $PKG_RM_LOG | grep $i
1388 if [ $REMOVE_TT_ONLY == "NO" ] ; then
1391 if [ $VERT == "YES" ] ; then
1392 /usr/sbin/pkgadd $VERBOSE -d `pwd` SUNWtltkm 2>&1 | tee -a $PKG_LOG
1394 /usr/sbin/pkgadd $VERBOSE -d `pwd` SUNWtltkm 2>&1 | tee -a $PKG_LOG | grep SUNWtltkm
1407 # ********************************************************************
1409 # Load Package Strings.
1412 # ********************************************************************
1413 function LoadStrings
1416 case "X$(uname -r)" in
1419 DEV_PKGS="SUNWdtinc SUNWdtma SUNWdtmad SUNWmfdm SUNWdthed SUNWdtab SUNWdtdem SUNWmfman"
1420 END_PKGS="SUNWdtwm SUNWdthe SUNWdthev SUNWdtdst SUNWdtim"
1421 MIN_PKGS="SUNWdtft SUNWdtdmn SUNWdtbas SUNWdticn SUNWdtdte SUNWmfrun"
1423 DEV_RM_PKGS="SUNWdtinc SUNWdtma SUNWdtmad SUNWmfdm SUNWmfdem SUNWdthed SUNWdtab SUNWdtdem SUNWmfman"
1424 END_RM_PKGS="SUNWdtwm SUNWdthe SUNWdthev SUNWdtdst SUNWdtim"
1425 MIN_RM_PKGS="SUNWdtft SUNWdtdmn SUNWdtbas SUNWdticn SUNWdtdte SUNWmfrun"
1432 if [ ! -h /usr/dt/lib/libtt.so ]; then if [ ! -f /usr/dt/lib/libtt.so ]; then
1439 /bin/pkginfo -q SUNWtltk.*
1441 if [ $FOUNDPKG -ne 0 ]; then
1451 DEV_PKGS="SUNWdtinc SUNWdtma SUNWdtmad SUNWdthed SUNWdtab SUNWdtdem ${SUNWtltkm} ${SUNWtltkd}"
1452 END_PKGS="SUNWdtwm SUNWdthe SUNWdthev SUNWdtdst SUNWdtim"
1453 MIN_PKGS="SUNWdtft SUNWdtdmn SUNWdtbas SUNWdticn ${SUNWdtcor} SUNWdtdte SUNWmfrun ${SUNWtltk}"
1455 DEV_RM_PKGS="SUNWdtinc SUNWdtma SUNWdtmad SUNWdthed SUNWdtab SUNWdtdem ${SUNWtltkm} ${SUNWtltkd}"
1456 END_RM_PKGS="SUNWdtwm SUNWdthe SUNWdthev SUNWdtdst SUNWdtim"
1457 MIN_RM_PKGS="SUNWdtft SUNWdtdmn SUNWdtbas SUNWdticn ${SUNWtltk} SUNWdtdte SUNWmfrun"
1464 Error: CDE 1.0 is only supported on SunOS 5.4 and 5.5
1467 Press <Enter> to exit..
1473 echo "Error: $DATE: Wrong OS version, uname -r did not return 5.4 or 5.5" >> $ADMIN_LOG
1481 # ********************************************************************
1483 # Check to be sure user is root
1485 # ********************************************************************
1487 USER=`/bin/id | grep root | wc -l`
1492 echo "You must be root to run this script"
1500 # ********************************************************************
1502 # Variable Initialization
1505 # ********************************************************************
1506 trap 'rm -f /tmp/admin.$$; rm -f tmp.whatami.$$; rm -f /usr/dt/tmp.install.file.$$; exit' INT QUIT TERM EXIT
1530 if [ $PLATFORM == "i386" ]
1535 DATE=`date '+%d%b%y-%H:%M:%S'`
1536 PATH=/bin:/usr/bin:/etc:/usr/bin
1537 ADMIN_LOG=/usr/tmp/SunSoft_CDE1.0_install.log.${DATE}
1538 PKG_RM_LOG=/usr/tmp/SunSoft_CDE1.0_pkgrm.log.${DATE}
1539 PKG_LOG=/usr/tmp/SunSoft_CDE1.0_pkgadd.log.${DATE}
1540 VERBOSE="-n -a /tmp/admin.$$"
1543 LINE="____________________________________________________________________________"
1545 cat >/tmp/admin.$$ <<EOF
1560 # ********************************************************************
1562 # Argument Processing
1565 # ********************************************************************
1569 HELP $1 # exit on error
1574 -loc) SDTHOME=$2; shift 2 ;; # install location for /usr/dt
1575 -link) LINKDIR=$2 ; LinkFunc ; exit ;;
1576 -noclean) CLEAN="NO"; shift ;;
1577 -nospace) CHECK="NO"; shift ;;
1578 -nocheck) CDE_CHECK="NO"; shift ;;
1579 -nopatches) PATCH="NO"; shift ;;
1580 -nologin) DTLOGIN="NO"; shift ;;
1581 -debug) DEBUG="set -xv"; shift ;;
1582 -remove) LoadStrings; RemoveCDE; exit ;;
1583 -help) HELP; exit ;;
1585 -ver) VERT="YES"; VERBOSE=""; shift ;;
1586 -min) MENU_SELECT="YES"; response="1"; shift ;;
1587 -end) MENU_SELECT="YES"; response="2"; shift ;;
1588 -dev) MENU_SELECT="YES"; response="3"; shift ;;
1589 *) HELP $1; shift ;; # exit on error
1594 # ********************************************************************
1596 # Place the selection Menu on the screen
1598 # ********************************************************************
1602 while [ $DONE = "NO" ]
1604 while [ $MENU_SELECT = "NO" ]
1613 Solaris Common Desktop Environment
1620 1. Minimum Installation
1626 3. Developer & End User
1629 4. Set Install Options
1631 Install Location: [ $SDTHOME ]
1632 Remove Old CDE Packages: [ $CLEAN ]
1633 Interactive Installation: [ $VERT ]
1634 Solaris Desktop Login
1635 at System Boot: [ $DTLOGIN ]
1637 0. Cancel Installation
1643 print -n "\tSELECT A NUMBER [2] "
1646 if [[ $response = `` ]] then response="2"; fi
1649 print -n "\tYou have selected \"$response\", is this Correct ? (Y/N) [Y]"
1652 if [[ $abort_chance = "Y" || $abort_chance = "y" ]] then
1655 if [[ $abort_chance = `` ]] then MENU_SELECT=YES; fi
1661 if [[ $MENU_SELECT = YES ]] then
1669 if [ $CHECK == "YES" ] ; then CheckDisk ; else DONE=YES; fi
1670 if [ $SDTHOME != "/usr/dt" ] ; then CreateTheLink ; else DONE=YES; fi
1671 if [ $DONE = "YES" ] ; then InstallMin ; fi
1672 if [ $PATCH = "YES" ] ; then MinPatch ; else DONE=YES; fi
1673 if [ $DTLOGIN = "YES" ] ; then RunDtconfig ; else DONE=YES; fi
1680 if [ $CHECK == "YES" ] ; then CheckDisk ; else DONE=YES; fi
1681 if [ $SDTHOME != "/usr/dt" ] ; then CreateTheLink ; else DONE=YES; fi
1682 if [ $DONE = "YES" ] ; then InstallMin ; fi
1683 if [ $DONE = "YES" ] ; then InstallEnd ; fi
1684 if [ $PATCH = "YES" ] ; then MinPatch ; else DONE=YES; fi
1685 if [ $PATCH = "YES" ] ; then EndPatch ; else DONE=YES; fi
1686 if [ $DTLOGIN = "YES" ] ; then RunDtconfig ; else DONE=YES; fi
1694 if [ $CHECK == "YES" ] ; then CheckDisk ; else DONE=YES; fi
1695 if [ $SDTHOME != "/usr/dt" ] ; then CreateTheLink ; else DONE=YES; fi
1696 if [ $DONE = "YES" ] ; then InstallMin ; fi
1697 if [ $DONE = "YES" ] ; then InstallEnd ; fi
1698 if [ $DONE = "YES" ] ; then InstallDev ; fi
1699 if [ $PATCH = "YES" ] ; then MinPatch ; else DONE=YES; fi
1700 if [ $PATCH = "YES" ] ; then EndPatch ; else DONE=YES; fi
1701 if [ $PATCH = "YES" ] ; then DevPatch ; else DONE=YES; fi
1702 if [ $DTLOGIN = "YES" ] ; then RunDtconfig ; else DONE=YES; fi
1717 print "\t\tI don't recogize..\"$response\" Sorry.. "
1731 # ********************************************************************
1735 ********************************************************************