Changeset 591

Show
Ignore:
Timestamp:
03/29/07 14:38:43 (2 years ago)
Author:
sacha
Message:

updated scritps to clean up chroot after usage.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/bin/applications/nightly_build_test_infrastructure/chroot.rb

    r589 r591  
    6363    run "#{@sudo}mkdir #{@complete_path}" 
    6464    run "#{@sudo}debootstrap #{@release} #{@complete_path} http://ftp.debian.org/debian/  >> #{@log_file}" 
     65    run "#{@sudo}cp /etc/fstab /root/fstab.orig" 
    6566    run "#{@sudo}echo \"/proc #{@complete_path}/proc proc defaults 0 0\" >> /etc/fstab" 
    6667    run "#{@sudo}echo \"/dev #{@complete_path}/dev dev defaults 0 0\" >> /etc/fstab" 
     68    run "#{@sudo}echo \"cd /dev; /sbin/MAKEDEV generic; cd -\" >> /#{@complete_path}/root/dev_create" 
     69    run "#{@sudo]chroot #{@complete_path} sh root/dev_create" 
    6770    run "#{@sudo}mount #{@complete_path}/proc" 
    68     run "#{@sudo}mount --bind /dev #{@complete_path}/dev
     71    run "#{@sudo}mount /dev #{@complete_path}/dev -o bind
    6972 
    7073    return @complete_path 
     
    121124  end 
    122125 
     126  # This method unmounts any directories that the chroot mounted previously 
     127  def clean_up_chroot 
     128    run "#{@sudo}umount #{@complete_path}/proc" 
     129    run "#{@sudo}umount #{@complete_path}/dev" 
     130    run "#{@sudo}mv /root/fstab.orig /etc/fstab" 
     131  end 
     132 
    123133  private  
    124134   
  • trunk/bin/applications/nightly_build_test_infrastructure/hefeweizen-test-system.rb

    r589 r591  
    7979    begin 
    8080 
     81      @logger.info "Creating new chroot..." 
    8182      path = chroot.create 
    8283      @logger.info "Created new chroot with the name '#{chroot_name}' at the following path: #{path}" 
     84 
     85       
    8386 
    8487      @logger.info "Installing subversion and setting up ssl certificate" 
     
    113116      chroot.copy_test_result_to "#{@target_path}/#{RESULTS_PATH}", prefix = chroot_name 
    114117       
     118      @logger.info "Clean up system" 
     119      chroot.clean_up_chroot 
     120 
    115121      @logger.info "No problems reported. Check the result of the test." 
    116122