Fix bug with umounting
This commit is contained in:
parent
8085ed43a2
commit
82c27b7221
1 changed files with 4 additions and 11 deletions
|
|
@ -12,7 +12,7 @@ function wxumount {
|
|||
mkdir -p $1
|
||||
if mountpoint -q $1; then
|
||||
echo "Unmounting $1..."
|
||||
umount /mnt/winux
|
||||
umount $1
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "Successfully unmounted $1."
|
||||
else
|
||||
|
|
@ -64,18 +64,15 @@ export WINUX_LOOP_DEV="$(losetup --find --show -P $WINUX_LOOP_DEV)"
|
|||
|
||||
mkfs.ext2 ${WINUX_LOOP_DEV}p1
|
||||
|
||||
tune2fs ${WINUX_LOOP_DEV}p1 -U 1be261e2-a12d-4468-aa45-cbd7e68636eb
|
||||
|
||||
mount ${WINUX_LOOP_DEV}p1 /mnt/winux
|
||||
|
||||
## The image is formatted and ready to copy files over
|
||||
|
||||
|
||||
export LINUX_LOOP_DEV="$(losetup --find --show --partscan $LINUX_DISK_IMG)"
|
||||
|
||||
tune2fs ${WINUX_LOOP_DEV}p1 -U 1be261e2-a12d-4468-aa45-cbd7e68636eb
|
||||
|
||||
mount ${LINUX_LOOP_DEV}p1 /mnt/linux
|
||||
|
||||
|
||||
# copying files
|
||||
|
||||
cd /mnt/linux
|
||||
|
|
@ -95,7 +92,7 @@ tar --numeric-owner --xattrs --acls -cpf - \
|
|||
|
||||
|
||||
#### TESTTING CODE
|
||||
losetup -j $WINUX_DISK_IMG
|
||||
# losetup -j $WINUX_DISK_IMG
|
||||
|
||||
# Clean up after building
|
||||
|
||||
|
|
@ -110,10 +107,6 @@ for dev in $(losetup -j $LINUX_DISK_IMG | cut -d: -f1); do
|
|||
losetup -d "$dev"
|
||||
done
|
||||
|
||||
|
||||
# Create an archive
|
||||
#
|
||||
|
||||
echo "making the archive"
|
||||
|
||||
# Best compressing rato, but slow and memory hungry (I LIKE IT)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue