Ignore:
Timestamp:
Jul 15, 2013 8:11:09 AM (9 months ago)
Author:
Kris Moore <kris@…>
Branches:
master, 9.2-release, releng/10.0, releng/10.0.1
Children:
cd7f833
Parents:
a11878a
Message:

Update pc-thinclient, now when we setup a remote desktop server
it won't require the ports tree, and will just grab pkgng packages to build
the PXE world environment. Also it will enable GDM / XDMCP automatically for the user

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src-sh/pc-thinclient/pc-thinclient

    ra11878a r4c50941  
    316316        if [ -e "${PXEWORLD}/usr/local/bin/xv" ] ; then return ; fi 
    317317 
    318         if [ ! -d "${PXEWORLD}/usr/ports/x11/xorg" -a ! -d "/usr/ports/x11/xorg" ] ; then 
    319                 exit_err "Missing /usr/ports/x11/xorg, please checkout ports tree to continue" 
    320         fi  
    321  
    322         if [ ! -d "${PXEWORLD}/usr/ports/x11/xorg" ] ; then 
    323                 rm -rf "${PXEWORLD}/usr/ports" 
    324                 echo "Copying /usr/ports -> ${PXEWORLD}/usr/ports" 
    325                 cp -r /usr/ports ${PXEWORLD}/usr/ports 
    326         fi 
    327  
    328         # Building ports inside world 
    329         mount -t devfs devfs ${PXEWORLD}/dev 
    330         cp /etc/resolv.conf ${PXEWORLD}/etc/resolv.conf 
    331         echo "BATCH=yes" >> ${PXEWORLD}/etc/make.conf 
    332         echo '#!/bin/sh 
    333  
    334 /etc/rc.d/ldconfig start 
    335 chmod 777 /tmp 
    336 MACHINE=i386 ; export MACHINE 
    337 UNAME_p=i386 ; export UNAME_p 
    338 UNAME_m=i386 ; export UNAME_m 
    339  
    340 for p in $WORLDPORTS 
    341 do 
    342         cd /usr/ports/$p 
    343         make install 
    344         if [ "$?" != "0" ] ; then 
    345                 exit 1 
    346         fi 
    347 done 
    348 ' > ${PXEWORLD}/.mkports.sh 
    349  
    350         chmod 755 ${PXEWORLD}/.mkports.sh 
    351         chroot ${PXEWORLD} /.mkports.sh 
    352         if [ "$?" != "0" ] ; then 
    353                 exit_err "Failed building thinclient world ports!" 
    354         fi 
    355         rm ${PXEWORLD}/.mkports.sh 
    356         umount ${PXEWORLD}/dev 
    357  
     318        # Install Xorg 
     319        pkg -c ${PXEWORLD} install -y xorg 
     320 
     321        # Need to install / use GDM on the base system 
     322        if [ ! -e "/usr/local/sbin/gdm" ] ; then 
     323                pkg install -y gdm 
     324        fi 
     325 
     326        # Disable PCDM since it doesn't do XDMCP 
     327        grep -q '^pcdm_enable="NO"' /etc/rc.conf 
     328        if [ $? -ne 0 ] ; then 
     329                echo 'pcdm_enable="NO"' >> /etc/rc.conf 
     330        fi 
     331 
     332        # Enable GDM for its XDMCP support 
     333        grep -q '^gdm_enable="YES"' /etc/rc.conf 
     334        if [ $? -ne 0 ] ; then 
     335                echo 'gdm_enable="YES"' >> /etc/rc.conf 
     336        fi 
     337 
     338        # Copy GDM pam & rc files 
     339        cp ${PROGDIR}/resources/gdm/gdm-pam /usr/local/etc/pam.d/gdm 
     340        cp ${PROGDIR}/resources/gdm/gdm-rc /usr/local/etc/rc.d/gdm 
     341        cp ${PROGDIR}/resources/gdm/custom.conf /usr/local/etc/gdm/custom.conf 
    358342} 
    359343 
     
    369353 
    370354  # Set the system arch type 
    371   if [ "$SYSTYPE" = "desktop" ] ; then 
    372     # If building remote X server, we don't need to run amd64 
    373     ARCH="i386" 
    374   else 
    375     ARCH="`uname -m`" 
    376   fi 
     355  ARCH="`uname -m`" 
    377356 
    378357  local dFiles="base.txz doc.txz kernel.txz games.txz" 
     
    514493if [ "$SYSTYPE" = "desktop" ] ; then 
    515494  echo "" 
    516   echo "You will now need to enable remote desktop." 
    517   echo "This can be done via the PC-BSD Control Panel -> GDM Configuration" 
    518   echo "or by manually editing /usr/local/etc/gdm/custom.conf" 
     495  echo "You will need to reboot the system for the login manager changes" 
     496  echo "to take effect." 
    519497else 
    520498  echo "" 
Note: See TracChangeset for help on using the changeset viewer.