1 |
|
#!/bin/sh -x |
2 |
|
|
3 |
|
if mount | egrep '/tmp/(base|export|changes)' ; then |
4 |
|
sudo umount -l /tmp/changes |
5 |
|
sudo umount -l /tmp/base |
6 |
|
sudo umount -l /tmp/export |
7 |
|
echo "umounted" |
8 |
|
exit |
9 |
|
fi |
10 |
|
|
11 |
sudo mount /srv/pxelator/tftp/webconverger/iso/live/filesystem.squashfs /tmp/base/ -o loop |
sudo mount /srv/pxelator/tftp/webconverger/iso/live/filesystem.squashfs /tmp/base/ -o loop |
12 |
|
|
13 |
mkdir /tmp/changes /tmp/base /tmp/export |
mkdir /tmp/changes /tmp/base /tmp/export |
16 |
|
|
17 |
sudo chroot /tmp/export |
sudo chroot /tmp/export |
18 |
|
|
19 |
sudo mksquashfs /tmp/export/ /srv/pxelator/tftp/webconverger/custom.squashfs |
path=/srv/pxelator/tftp/webconverger/custom.squashfs |
20 |
|
|
21 |
|
test -e $path && mv $path $path.old |
22 |
|
|
23 |
|
sudo mksquashfs /tmp/export/ $path |