/[pxelator]/bin/squashfs-overlay.sh
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /bin/squashfs-overlay.sh

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

bin/webc-overlay.sh revision 448 by dpavlin, Thu Oct 1 11:23:05 2009 UTC bin/squashfs-overlay.sh revision 537 by dpavlin, Fri Sep 17 21:53:19 2010 UTC
# Line 1  Line 1 
1  #!/bin/sh -x  #!/bin/sh -x
2    
3    from=/srv/pxelator/tftp/webconverger/iso/live/filesystem.squashfs
4    path=/srv/pxelator/tftp/webconverger/custom.squashfs
5    
6    from=/srv/pxelator/tftp/debian_live/debian-live-60alpha2-i386-standard.squashfs
7    path=/srv/pxelator/tftp/debian_live/custom.squashfs
8    
9  if mount | egrep '/tmp/(base|export|changes)' ; then  if mount | egrep '/tmp/(base|export|changes)' ; then
10          sudo umount -l /tmp/changes          sudo umount -l /tmp/changes
11          sudo umount -l /tmp/base          sudo umount -l /tmp/base
12          sudo umount -l /tmp/export          while sudo umount -l /tmp/export ; do
13                    echo "again"
14            done
15          echo "umounted"          echo "umounted"
16          exit          exit
17  fi  fi
18    
19  sudo mount /srv/pxelator/tftp/webconverger/iso/live/filesystem.squashfs /tmp/base/ -o loop  sudo apt-get install squashfs-tools
20    
21  mkdir /tmp/changes /tmp/base /tmp/export  mkdir /tmp/base
22    
23  sudo mount -t aufs -o br:/tmp/changes/:/tmp/base/ none /tmp/export/  mount $from /tmp/base -o loop || exit
24    
25  sudo chroot /tmp/export  mkdir /tmp/changes /tmp/export
26    stat --format='chmod -v %a /tmp/changes /tmp/export && chown -v %u:%g /tmp/changes /tmp/export' /tmp/base | sh -x
27    sudo mount -t aufs -o br:/tmp/changes:/tmp/base none /tmp/export
28    
29  path=/srv/pxelator/tftp/webconverger/custom.squashfs  df -h /tmp/base /tmp/changes /tmp/export
30    
31  test -e $path && mv $path $path.old  echo "Now modify your installation, type exit to remaster into $path"
32    sudo chroot /tmp/export || exit
33    
34  sudo mksquashfs /tmp/export/ $path  sudo rm -fv $path.new
35    sudo mksquashfs /tmp/export $path.new && mv $path $path.old
36    mv $path.new $path && chmod 444 $path && ls -al $path

Legend:
Removed from v.448  
changed lines
  Added in v.537

  ViewVC Help
Powered by ViewVC 1.1.26