Changeset 502864c


Ignore:
Timestamp:
07/02/15 06:41:35 (2 months ago)
Author:
angelescuo <angelescuo@…>
Branches:
master, releng/10.2, stable/10
Children:
b56c39f
Parents:
3086e9f
Message:

changed functions-extractimage.sh to rsync from a ro layer for ghostbsd livecd

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src-sh/pcbsd-utils/pc-sysinstall/backend/functions-extractimage.sh

    r963f54b r502864c  
    144144      fi 
    145145      ;; 
    146     livecd)  
    147       # Copying file to disk without /usr 
    148       rsync -avzH --exclude 'uzip' --exclude 'media/*' --exclude 'proc/*' --exclude 'mnt/*' --exclude 'tmp/*' --exclude 'dist/*' --exclude 'usr' / ${FSMNT} >&1 2>&1 
     146    livecd) 
     147     # GhostBSD specific (prepare a ro layer to copy from) 
     148      DEVICE=$(mdconfig -a -t vnode -o readonly -f /dist/uzip${UZIP_DIR}.uzip) 
     149      mount -o ro ${DEVICE}.uzip ${CDMNT}${UZIP_DIR} 
     150      # Copying file to disk  
     151      rsync -avzH --exclude 'media/*' --exclude 'proc/*' --exclude 'mnt/*' --exclude 'tmp/*' --exclude 'dist/*' --exclude 'gbi' --exclude 'cdmnt-install' ${CDMNT}/ ${FSMNT} >&1 2>&1 
    149152      if [ "$?" != "0" ] 
    150153      then 
    151154        exit_err "ERROR: Failed to copy files" 
    152155      fi 
    153       # Copying /usr alone to disk 
    154       rsync -avzH /usr ${FSMNT}/ >&1 2>&1 
    155       if [ "$?" != "0" ] 
    156       then 
    157         exit_err "ERROR: Failed to copy files" 
    158       fi 
     156      umount -f ${CDMNT}${UZIP_DIR} 
     157      mdconfig -d -u ${DEVICE} 
     158      chmod 1777 ${FSMNT}/tmp 
    159159      ;; 
    160160  esac 
     
    583583 
    584584}; 
     585 DEVICE=$(mdconfig -a -t vnode -o readonly -f /dist/uzip/usr.uzip) 
     586      mount -o ro ${DEVICE}.uzip ${CDMNT}${UZIP_DIR} 
Note: See TracChangeset for help on using the changeset viewer.