##// END OF EJS Templates
Fixes for Debian stretch release support
Fixes for Debian stretch release support

Fichier de la dernière révision:

r82:d0f91512d9ca
r93:d975bb85d0ff
Show More
functions.sh
44 lines | 1.1 KiB | application/x-sh | BashLexer
Jan Wagner
spliting more files, fix-uboot, fix-fbturbo, fix-locale
r67 # This file contains utility functions used by rpi2-gen-image.sh
Filip Pytloun
Refactor: split bootstrap actions and allow custom
r56 cleanup (){
set +x
set +e
Jan Wagner
spliting more files, fix-uboot, fix-fbturbo, fix-locale
r67
# Identify and kill all processes still using files
Filip Pytloun
Enhance cleanup by killing processes running in endpoint
r59 echo "killing processes using mount point ..."
Jan Wagner
fix: ENABLE_CRYPTFS -> UBOOT, SPLITFS, EXPANDROOT - cleanup
r82 fuser -k "${R}"
Filip Pytloun
Enhance cleanup by killing processes running in endpoint
r59 sleep 3
Jan Wagner
fix: ENABLE_CRYPTFS -> UBOOT, SPLITFS, EXPANDROOT - cleanup
r82 fuser -9 -k -v "${R}"
Jan Wagner
spliting more files, fix-uboot, fix-fbturbo, fix-locale
r67
Jan Wagner
shred-fix
r78 # Clean up temporary .password file
if [ -r ".password" ] ; then
shred -zu .password
fi
Jan Wagner
spliting more files, fix-uboot, fix-fbturbo, fix-locale
r67 # Clean up all temporary mount points
Filip Pytloun
Refactor: split bootstrap actions and allow custom
r56 echo "removing temporary mount points ..."
Jan Wagner
fix: ENABLE_CRYPTFS -> UBOOT, SPLITFS, EXPANDROOT - cleanup
r82 umount -l "${R}/proc" 2> /dev/null
umount -l "${R}/sys" 2> /dev/null
umount -l "${R}/dev/pts" 2> /dev/null
Filip Pytloun
Refactor: split bootstrap actions and allow custom
r56 umount "$BUILDDIR/mount/boot/firmware" 2> /dev/null
umount "$BUILDDIR/mount" 2> /dev/null
Jan Wagner
Added: ENABLE_CRYPTFS - encrypted rootfs, use-latest-bootloader, cp-cleanup
r77 cryptsetup close "${CRYPTFS_MAPPING}" 2> /dev/null
Vincent Knecht
Added ENABLE_SPLITFS option to produce distinct /boot/firmware and root images
r66 losetup -d "$ROOT_LOOP" 2> /dev/null
losetup -d "$FRMW_LOOP" 2> /dev/null
Filip Pytloun
Refactor: split bootstrap actions and allow custom
r56 trap - 0 1 2 3 6
}
chroot_exec() {
# Exec command in chroot
Jan Wagner
fix: ENABLE_CRYPTFS -> UBOOT, SPLITFS, EXPANDROOT - cleanup
r82 LANG=C LC_ALL=C DEBIAN_FRONTEND=noninteractive chroot ${R} $*
Filip Pytloun
Refactor: split bootstrap actions and allow custom
r56 }
Jan Wagner
spliting more files, fix-uboot, fix-fbturbo, fix-locale
r67
install_readonly() {
# Install file with user read-only permissions
install -o root -g root -m 644 $*
}
install_exec() {
# Install file with root exec permissions
install -o root -g root -m 744 $*
}