functions.sh
19 lines
| 486 B
| application/x-sh
|
BashLexer
Filip Pytloun
|
r56 | cleanup (){ | ||
# Clean up all temporary mount points | ||||
set +x | ||||
set +e | ||||
echo "removing temporary mount points ..." | ||||
umount -l $R/proc 2> /dev/null | ||||
umount -l $R/sys 2> /dev/null | ||||
umount -l $R/dev/pts 2> /dev/null | ||||
umount "$BUILDDIR/mount/boot/firmware" 2> /dev/null | ||||
umount "$BUILDDIR/mount" 2> /dev/null | ||||
losetup -d "$EXT4_LOOP" 2> /dev/null | ||||
losetup -d "$VFAT_LOOP" 2> /dev/null | ||||
trap - 0 1 2 3 6 | ||||
} | ||||
chroot_exec() { | ||||
# Exec command in chroot | ||||
LANG=C LC_ALL=C chroot $R $* | ||||
} | ||||