locks: tidy lock acquisition
Combine the check+create done in each script. (The original functions are still callable as before, but a new combined `Aquire_lockfile` function can be called instead, as now used). Note, a further simplification could be done in removing the passing of the lock filename in as a parameter since every use of the functions is with ".lock". The lock functions already have a fallback to ".build/lock" though. Checking the history, the fallback used to be for a system wide lock, which was then replaced with this config-tree specific one. As long as that is not used implicitly by 3rd-party hooks then surely we are free to change the fallback to ".lock" and further remove passing in a name as a param...? history:db5d2b0dcd
0aa8289a37
Gbp-Dch: Short Closes: #952918
This commit is contained in:
parent
346e3e1c36
commit
b27927724a
|
@ -9,40 +9,38 @@
|
||||||
## under certain conditions; see COPYING for details.
|
## under certain conditions; see COPYING for details.
|
||||||
|
|
||||||
|
|
||||||
|
Acquire_lockfile ()
|
||||||
|
{
|
||||||
|
local FILE="${1:-.lock}"
|
||||||
|
Check_lockfile "${FILE}"
|
||||||
|
Create_lockfile "${FILE}"
|
||||||
|
}
|
||||||
|
|
||||||
Check_lockfile ()
|
Check_lockfile ()
|
||||||
{
|
{
|
||||||
FILE="${1}"
|
local FILE="${1}"
|
||||||
|
|
||||||
if [ -z "${FILE}" ]
|
if [ -f "${FILE}" ]; then
|
||||||
then
|
Echo_error "${PROGRAM} already locked"
|
||||||
FILE=".build/lock"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Checking lock file
|
|
||||||
if [ -f "${FILE}" ]
|
|
||||||
then
|
|
||||||
Echo_error "${PROGRAM} locked"
|
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
Create_lockfile ()
|
Create_lockfile ()
|
||||||
{
|
{
|
||||||
FILE="${1}"
|
local FILE="${1}"
|
||||||
|
|
||||||
if [ -z "${FILE}" ]
|
# Create lock trap
|
||||||
then
|
# This automatically removes the lock file in certain conditions
|
||||||
FILE=".build/lock"
|
|
||||||
fi
|
|
||||||
|
|
||||||
DIRECTORY="$(dirname ${FILE})"
|
|
||||||
|
|
||||||
# Creating lock directory
|
|
||||||
mkdir -p "${DIRECTORY}"
|
|
||||||
|
|
||||||
# Creating lock trap
|
|
||||||
trap 'ret=${?}; '"rm -f \"${FILE}\";"' exit ${ret}' EXIT HUP INT QUIT TERM
|
trap 'ret=${?}; '"rm -f \"${FILE}\";"' exit ${ret}' EXIT HUP INT QUIT TERM
|
||||||
|
|
||||||
# Creating lock file
|
# Creating lock file
|
||||||
touch "${FILE}"
|
touch "${FILE}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Remove_lockfile ()
|
||||||
|
{
|
||||||
|
local FILE="${1:-.lock}"
|
||||||
|
|
||||||
|
rm -f "${FILE}"
|
||||||
|
}
|
||||||
|
|
|
@ -32,11 +32,8 @@ Require_stagefile .build/config .build/bootstrap
|
||||||
# Checking stage file
|
# Checking stage file
|
||||||
Check_stagefile .build/binary_checksums
|
Check_stagefile .build/binary_checksums
|
||||||
|
|
||||||
# Checking lock file
|
# Aquire lock file
|
||||||
Check_lockfile .lock
|
Acquire_lockfile
|
||||||
|
|
||||||
# Creating lock file
|
|
||||||
Create_lockfile .lock
|
|
||||||
|
|
||||||
for CHECKSUM in ${LB_CHECKSUMS}
|
for CHECKSUM in ${LB_CHECKSUMS}
|
||||||
do
|
do
|
||||||
|
|
|
@ -29,11 +29,8 @@ Require_stagefile .build/config .build/bootstrap
|
||||||
# Checking stage file
|
# Checking stage file
|
||||||
Check_stagefile .build/binary_chroot
|
Check_stagefile .build/binary_chroot
|
||||||
|
|
||||||
# Checking lock file
|
# Aquire lock file
|
||||||
Check_lockfile .lock
|
Acquire_lockfile
|
||||||
|
|
||||||
# Creating lock file
|
|
||||||
Create_lockfile .lock
|
|
||||||
|
|
||||||
# Normally, virtual filesystems are not mounted here, but people tend to be lazy
|
# Normally, virtual filesystems are not mounted here, but people tend to be lazy
|
||||||
if [ -f chroot/proc/version ]
|
if [ -f chroot/proc/version ]
|
||||||
|
|
|
@ -37,11 +37,8 @@ Require_stagefile .build/config .build/bootstrap
|
||||||
# Checking stage file
|
# Checking stage file
|
||||||
Check_stagefile .build/binary_disk
|
Check_stagefile .build/binary_disk
|
||||||
|
|
||||||
# Checking lock file
|
# Aquire lock file
|
||||||
Check_lockfile .lock
|
Acquire_lockfile
|
||||||
|
|
||||||
# Creating lock file
|
|
||||||
Create_lockfile .lock
|
|
||||||
|
|
||||||
mkdir -p binary/.disk
|
mkdir -p binary/.disk
|
||||||
|
|
||||||
|
|
|
@ -31,11 +31,8 @@ Require_stagefile .build/config .build/bootstrap
|
||||||
# Checking stage file
|
# Checking stage file
|
||||||
Check_stagefile .build/binary_grub-efi
|
Check_stagefile .build/binary_grub-efi
|
||||||
|
|
||||||
# Checking lock file
|
# Aquire lock file
|
||||||
Check_lockfile .lock
|
Acquire_lockfile
|
||||||
|
|
||||||
# Creating lock file
|
|
||||||
Create_lockfile .lock
|
|
||||||
|
|
||||||
# Check architecture
|
# Check architecture
|
||||||
Check_architectures amd64 i386 arm64
|
Check_architectures amd64 i386 arm64
|
||||||
|
|
|
@ -31,11 +31,8 @@ Require_stagefile .build/config .build/bootstrap
|
||||||
# Checking stage file
|
# Checking stage file
|
||||||
Check_stagefile .build/binary_grub-legacy
|
Check_stagefile .build/binary_grub-legacy
|
||||||
|
|
||||||
# Checking lock file
|
# Aquire lock file
|
||||||
Check_lockfile .lock
|
Acquire_lockfile
|
||||||
|
|
||||||
# Creating lock file
|
|
||||||
Create_lockfile .lock
|
|
||||||
|
|
||||||
# Check architecture
|
# Check architecture
|
||||||
Check_architectures amd64 i386
|
Check_architectures amd64 i386
|
||||||
|
|
|
@ -31,11 +31,8 @@ Require_stagefile .build/config .build/bootstrap
|
||||||
# Checking stage file
|
# Checking stage file
|
||||||
Check_stagefile .build/binary_grub
|
Check_stagefile .build/binary_grub
|
||||||
|
|
||||||
# Checking lock file
|
# Aquire lock file
|
||||||
Check_lockfile .lock
|
Acquire_lockfile
|
||||||
|
|
||||||
# Creating lock file
|
|
||||||
Create_lockfile .lock
|
|
||||||
|
|
||||||
# Check architecture
|
# Check architecture
|
||||||
Check_architectures amd64 i386
|
Check_architectures amd64 i386
|
||||||
|
|
|
@ -34,11 +34,8 @@ Require_stagefile .build/config .build/bootstrap .build/chroot_proc
|
||||||
# Checking stage file
|
# Checking stage file
|
||||||
Check_stagefile .build/binary_hdd
|
Check_stagefile .build/binary_hdd
|
||||||
|
|
||||||
# Checking lock file
|
# Aquire lock file
|
||||||
Check_lockfile .lock
|
Acquire_lockfile
|
||||||
|
|
||||||
# Creating lock file
|
|
||||||
Create_lockfile .lock
|
|
||||||
|
|
||||||
# Checking depends
|
# Checking depends
|
||||||
case "${LB_BINARY_FILESYSTEM}" in
|
case "${LB_BINARY_FILESYSTEM}" in
|
||||||
|
|
|
@ -29,11 +29,8 @@ Require_stagefile .build/config .build/bootstrap
|
||||||
# Checking stage file
|
# Checking stage file
|
||||||
Check_stagefile .build/binary_hooks
|
Check_stagefile .build/binary_hooks
|
||||||
|
|
||||||
# Checking lock file
|
# Aquire lock file
|
||||||
Check_lockfile .lock
|
Acquire_lockfile
|
||||||
|
|
||||||
# Creating lock file
|
|
||||||
Create_lockfile .lock
|
|
||||||
|
|
||||||
## Processing distribution hooks
|
## Processing distribution hooks
|
||||||
|
|
||||||
|
|
|
@ -29,11 +29,8 @@ Require_stagefile .build/config .build/bootstrap
|
||||||
# Checking stage file
|
# Checking stage file
|
||||||
Check_stagefile .build/binary_includes
|
Check_stagefile .build/binary_includes
|
||||||
|
|
||||||
# Checking lock file
|
# Aquire lock file
|
||||||
Check_lockfile .lock
|
Acquire_lockfile
|
||||||
|
|
||||||
# Creating lock file
|
|
||||||
Create_lockfile .lock
|
|
||||||
|
|
||||||
if Find_files config/includes.binary/
|
if Find_files config/includes.binary/
|
||||||
then
|
then
|
||||||
|
|
|
@ -43,11 +43,8 @@ Require_stagefile .build/config .build/bootstrap
|
||||||
# Checking stage file
|
# Checking stage file
|
||||||
Check_stagefile .build/binary_iso
|
Check_stagefile .build/binary_iso
|
||||||
|
|
||||||
# Checking lock file
|
# Aquire lock file
|
||||||
Check_lockfile .lock
|
Acquire_lockfile
|
||||||
|
|
||||||
# Creating lock file
|
|
||||||
Create_lockfile .lock
|
|
||||||
|
|
||||||
# Checking depends
|
# Checking depends
|
||||||
Check_package chroot /usr/bin/xorriso xorriso
|
Check_package chroot /usr/bin/xorriso xorriso
|
||||||
|
|
|
@ -34,11 +34,8 @@ Require_stagefile .build/config .build/bootstrap
|
||||||
# Checking stage file
|
# Checking stage file
|
||||||
Check_stagefile .build/binary_linux-image
|
Check_stagefile .build/binary_linux-image
|
||||||
|
|
||||||
# Checking lock file
|
# Aquire lock file
|
||||||
Check_lockfile .lock
|
Acquire_lockfile
|
||||||
|
|
||||||
# Creating lock file
|
|
||||||
Create_lockfile .lock
|
|
||||||
|
|
||||||
case "${LB_INITRAMFS}" in
|
case "${LB_INITRAMFS}" in
|
||||||
live-boot)
|
live-boot)
|
||||||
|
|
|
@ -34,12 +34,8 @@ Require_stagefile .build/config .build/bootstrap
|
||||||
# Checking stage file
|
# Checking stage file
|
||||||
Check_stagefile .build/binary_loadlin
|
Check_stagefile .build/binary_loadlin
|
||||||
|
|
||||||
# Checking lock file
|
# Aquire lock file
|
||||||
Check_lockfile .lock
|
Acquire_lockfile
|
||||||
|
|
||||||
# Creating lock file
|
|
||||||
Create_lockfile .lock
|
|
||||||
|
|
||||||
|
|
||||||
case "${LB_ARCHITECTURES}" in
|
case "${LB_ARCHITECTURES}" in
|
||||||
amd64|i386)
|
amd64|i386)
|
||||||
|
|
|
@ -33,11 +33,8 @@ Require_stagefile .build/config .build/bootstrap
|
||||||
# Checking stage file
|
# Checking stage file
|
||||||
Check_stagefile .build/binary_loopback_cfg
|
Check_stagefile .build/binary_loopback_cfg
|
||||||
|
|
||||||
# Checking lock file
|
# Aquire lock file
|
||||||
Check_lockfile .lock
|
Acquire_lockfile
|
||||||
|
|
||||||
# Creating lock file
|
|
||||||
Create_lockfile .lock
|
|
||||||
|
|
||||||
# Check architecture
|
# Check architecture
|
||||||
Check_architectures amd64 i386
|
Check_architectures amd64 i386
|
||||||
|
|
|
@ -34,11 +34,8 @@ Require_stagefile .build/config .build/bootstrap
|
||||||
# Checking stage file
|
# Checking stage file
|
||||||
Check_stagefile .build/binary_manifest
|
Check_stagefile .build/binary_manifest
|
||||||
|
|
||||||
# Checking lock file
|
# Aquire lock file
|
||||||
Check_lockfile .lock
|
Acquire_lockfile
|
||||||
|
|
||||||
# Creating lock file
|
|
||||||
Create_lockfile .lock
|
|
||||||
|
|
||||||
case "${LB_INITRAMFS}" in
|
case "${LB_INITRAMFS}" in
|
||||||
live-boot)
|
live-boot)
|
||||||
|
|
|
@ -34,11 +34,8 @@ Require_stagefile .build/config .build/bootstrap
|
||||||
# Checking stage file
|
# Checking stage file
|
||||||
Check_stagefile .build/binary_memtest
|
Check_stagefile .build/binary_memtest
|
||||||
|
|
||||||
# Checking lock file
|
# Aquire lock file
|
||||||
Check_lockfile .lock
|
Acquire_lockfile
|
||||||
|
|
||||||
# Creating lock file
|
|
||||||
Create_lockfile .lock
|
|
||||||
|
|
||||||
if [ "${LB_ARCHITECTURES}" != "amd64" ] && [ "${LB_ARCHITECTURES}" != "i386" ]
|
if [ "${LB_ARCHITECTURES}" != "amd64" ] && [ "${LB_ARCHITECTURES}" != "i386" ]
|
||||||
then
|
then
|
||||||
|
|
|
@ -39,11 +39,8 @@ Require_stagefile .build/config .build/bootstrap
|
||||||
# Checking stage file
|
# Checking stage file
|
||||||
Check_stagefile .build/binary_netboot
|
Check_stagefile .build/binary_netboot
|
||||||
|
|
||||||
# Checking lock file
|
# Aquire lock file
|
||||||
Check_lockfile .lock
|
Acquire_lockfile
|
||||||
|
|
||||||
# Creating lock file
|
|
||||||
Create_lockfile .lock
|
|
||||||
|
|
||||||
# Remove old binary
|
# Remove old binary
|
||||||
rm -f ${LIVE_IMAGE_NAME}-${LB_ARCHITECTURES}.netboot.tar ${LIVE_IMAGE_NAME}-${LB_ARCHITECTURES}.netboot.tar.gz ${LIVE_IMAGE_NAME}-${LB_ARCHITECTURES}.netboot.tar.bz2 ${LIVE_IMAGE_NAME}-${LB_ARCHITECTURES}.netboot.tar.xz ${LIVE_IMAGE_NAME}-${LB_ARCHITECTURES}.netboot.tar.xz
|
rm -f ${LIVE_IMAGE_NAME}-${LB_ARCHITECTURES}.netboot.tar ${LIVE_IMAGE_NAME}-${LB_ARCHITECTURES}.netboot.tar.gz ${LIVE_IMAGE_NAME}-${LB_ARCHITECTURES}.netboot.tar.bz2 ${LIVE_IMAGE_NAME}-${LB_ARCHITECTURES}.netboot.tar.xz ${LIVE_IMAGE_NAME}-${LB_ARCHITECTURES}.netboot.tar.xz
|
||||||
|
|
|
@ -47,11 +47,8 @@ Require_stagefile .build/config .build/binary_iso
|
||||||
# Checking stage file
|
# Checking stage file
|
||||||
Check_stagefile .build/binary_onie
|
Check_stagefile .build/binary_onie
|
||||||
|
|
||||||
# Checking lock file
|
# Aquire lock file
|
||||||
Check_lockfile .lock
|
Acquire_lockfile
|
||||||
|
|
||||||
# Creating lock file
|
|
||||||
Create_lockfile .lock
|
|
||||||
|
|
||||||
Check_package host /bin/cpio cpio
|
Check_package host /bin/cpio cpio
|
||||||
Check_package host /usr/bin/file file
|
Check_package host /usr/bin/file file
|
||||||
|
|
|
@ -29,11 +29,8 @@ Require_stagefile .build/config .build/bootstrap
|
||||||
# Checking stage file
|
# Checking stage file
|
||||||
Check_stagefile .build/binary_package-lists
|
Check_stagefile .build/binary_package-lists
|
||||||
|
|
||||||
# Checking lock file
|
# Aquire lock file
|
||||||
Check_lockfile .lock
|
Acquire_lockfile
|
||||||
|
|
||||||
# Creating lock file
|
|
||||||
Create_lockfile .lock
|
|
||||||
|
|
||||||
case "${LB_MODE}" in
|
case "${LB_MODE}" in
|
||||||
progress-linux)
|
progress-linux)
|
||||||
|
|
|
@ -29,11 +29,8 @@ Require_stagefile .build/config .build/bootstrap .build/binary_chroot
|
||||||
# Checking stage file
|
# Checking stage file
|
||||||
Check_stagefile .build/binary_rootfs
|
Check_stagefile .build/binary_rootfs
|
||||||
|
|
||||||
# Checking lock file
|
# Aquire lock file
|
||||||
Check_lockfile .lock
|
Acquire_lockfile
|
||||||
|
|
||||||
# Creating lock file
|
|
||||||
Create_lockfile .lock
|
|
||||||
|
|
||||||
case "${LB_ARCHITECTURES}" in
|
case "${LB_ARCHITECTURES}" in
|
||||||
amd64|i386)
|
amd64|i386)
|
||||||
|
@ -135,7 +132,7 @@ case "${LB_CHROOT_FILESYSTEM}" in
|
||||||
|
|
||||||
if [ -e chroot/chroot.cache ]
|
if [ -e chroot/chroot.cache ]
|
||||||
then
|
then
|
||||||
rm -f .lock
|
Remove_lockfile
|
||||||
mv chroot/chroot chroot.tmp
|
mv chroot/chroot chroot.tmp
|
||||||
|
|
||||||
lb chroot_archives binary remove ${@}
|
lb chroot_archives binary remove ${@}
|
||||||
|
@ -223,7 +220,7 @@ case "${LB_CHROOT_FILESYSTEM}" in
|
||||||
|
|
||||||
if [ -e chroot/chroot.cache ]
|
if [ -e chroot/chroot.cache ]
|
||||||
then
|
then
|
||||||
rm -f .lock
|
Remove_lockfile
|
||||||
mv chroot/chroot chroot.tmp
|
mv chroot/chroot chroot.tmp
|
||||||
|
|
||||||
lb chroot_archives binary remove ${@}
|
lb chroot_archives binary remove ${@}
|
||||||
|
@ -358,7 +355,7 @@ case "${LB_CHROOT_FILESYSTEM}" in
|
||||||
|
|
||||||
if [ -e chroot/chroot.cache ]
|
if [ -e chroot/chroot.cache ]
|
||||||
then
|
then
|
||||||
rm -f .lock
|
Remove_lockfile
|
||||||
mv chroot/chroot chroot.tmp
|
mv chroot/chroot chroot.tmp
|
||||||
|
|
||||||
lb chroot_archives binary remove ${@}
|
lb chroot_archives binary remove ${@}
|
||||||
|
|
|
@ -31,11 +31,8 @@ Require_stagefile .build/config .build/bootstrap
|
||||||
# Checking stage file
|
# Checking stage file
|
||||||
Check_stagefile .build/binary_syslinux
|
Check_stagefile .build/binary_syslinux
|
||||||
|
|
||||||
# Checking lock file
|
# Aquire lock file
|
||||||
Check_lockfile .lock
|
Acquire_lockfile
|
||||||
|
|
||||||
# Creating lock file
|
|
||||||
Create_lockfile .lock
|
|
||||||
|
|
||||||
# Check architecture
|
# Check architecture
|
||||||
Check_architectures amd64 i386
|
Check_architectures amd64 i386
|
||||||
|
|
|
@ -34,11 +34,8 @@ Require_stagefile .build/config .build/bootstrap
|
||||||
# Checking stage file
|
# Checking stage file
|
||||||
Check_stagefile .build/binary_tar
|
Check_stagefile .build/binary_tar
|
||||||
|
|
||||||
# Checking lock file
|
# Aquire lock file
|
||||||
Check_lockfile .lock
|
Acquire_lockfile
|
||||||
|
|
||||||
# Creating lock file
|
|
||||||
Create_lockfile .lock
|
|
||||||
|
|
||||||
# Remove old binary
|
# Remove old binary
|
||||||
rm -f ${LIVE_IMAGE_NAME}-${LB_ARCHITECTURES}.tar.bz2 ${LIVE_IMAGE_NAME}-${LB_ARCHITECTURES}.tar.gz ${LIVE_IMAGE_NAME}-${LB_ARCHITECTURES}.tar.lz ${LIVE_IMAGE_NAME}-${LB_ARCHITECTURES}.tar
|
rm -f ${LIVE_IMAGE_NAME}-${LB_ARCHITECTURES}.tar.bz2 ${LIVE_IMAGE_NAME}-${LB_ARCHITECTURES}.tar.gz ${LIVE_IMAGE_NAME}-${LB_ARCHITECTURES}.tar.lz ${LIVE_IMAGE_NAME}-${LB_ARCHITECTURES}.tar
|
||||||
|
|
|
@ -34,11 +34,8 @@ Require_stagefile .build/config .build/bootstrap
|
||||||
# Checking stage file
|
# Checking stage file
|
||||||
Check_stagefile .build/binary_win32-loader
|
Check_stagefile .build/binary_win32-loader
|
||||||
|
|
||||||
# Checking lock file
|
# Aquire lock file
|
||||||
Check_lockfile .lock
|
Acquire_lockfile
|
||||||
|
|
||||||
# Creating lock file
|
|
||||||
Create_lockfile .lock
|
|
||||||
|
|
||||||
case "${LB_MODE}" in
|
case "${LB_MODE}" in
|
||||||
progress-linux)
|
progress-linux)
|
||||||
|
|
|
@ -39,11 +39,8 @@ Require_stagefile .build/config .build/bootstrap
|
||||||
# Checking stage file
|
# Checking stage file
|
||||||
Check_stagefile .build/binary_zsync
|
Check_stagefile .build/binary_zsync
|
||||||
|
|
||||||
# Checking lock file
|
# Aquire lock file
|
||||||
Check_lockfile .lock
|
Acquire_lockfile
|
||||||
|
|
||||||
# Creating lock file
|
|
||||||
Create_lockfile .lock
|
|
||||||
|
|
||||||
# Checking depends
|
# Checking depends
|
||||||
Check_package chroot /usr/bin/zsyncmake zsync
|
Check_package chroot /usr/bin/zsyncmake zsync
|
||||||
|
|
|
@ -36,11 +36,8 @@ Echo_message "Configuring file /etc/apt/sources.list"
|
||||||
# Checking stage file
|
# Checking stage file
|
||||||
Check_stagefile .build/bootstrap_archives
|
Check_stagefile .build/bootstrap_archives
|
||||||
|
|
||||||
# Checking lock file
|
# Aquire lock file
|
||||||
Check_lockfile .lock
|
Acquire_lockfile
|
||||||
|
|
||||||
# Creating lock file
|
|
||||||
Create_lockfile .lock
|
|
||||||
|
|
||||||
# Restoring cache
|
# Restoring cache
|
||||||
Restore_package_cache chroot
|
Restore_package_cache chroot
|
||||||
|
|
|
@ -38,11 +38,8 @@ case "${1}" in
|
||||||
then
|
then
|
||||||
Echo_message "Restoring bootstrap stage from cache..."
|
Echo_message "Restoring bootstrap stage from cache..."
|
||||||
|
|
||||||
# Checking lock file
|
# Aquire lock file
|
||||||
Check_lockfile .lock
|
Acquire_lockfile
|
||||||
|
|
||||||
# Creating lock file
|
|
||||||
Create_lockfile .lock
|
|
||||||
|
|
||||||
# Removing old chroot
|
# Removing old chroot
|
||||||
rm -rf chroot
|
rm -rf chroot
|
||||||
|
@ -64,11 +61,8 @@ case "${1}" in
|
||||||
# Checking stage file
|
# Checking stage file
|
||||||
Check_stagefile .build/bootstrap_cache.save
|
Check_stagefile .build/bootstrap_cache.save
|
||||||
|
|
||||||
# Checking lock file
|
# Aquire lock file
|
||||||
Check_lockfile .lock
|
Acquire_lockfile
|
||||||
|
|
||||||
# Creating lock file
|
|
||||||
Create_lockfile .lock
|
|
||||||
|
|
||||||
rm -rf cache/bootstrap
|
rm -rf cache/bootstrap
|
||||||
|
|
||||||
|
|
|
@ -40,11 +40,8 @@ Check_package chroot bin/debootstrap debootstrap
|
||||||
Check_stagefile .build/bootstrap
|
Check_stagefile .build/bootstrap
|
||||||
Check_stagefile .build/bootstrap_cache.restore
|
Check_stagefile .build/bootstrap_cache.restore
|
||||||
|
|
||||||
# Checking lock file
|
# Aquire lock file
|
||||||
Check_lockfile .lock
|
Acquire_lockfile
|
||||||
|
|
||||||
# Creating lock file
|
|
||||||
Create_lockfile .lock
|
|
||||||
|
|
||||||
# Creating chroot directory
|
# Creating chroot directory
|
||||||
mkdir -p chroot
|
mkdir -p chroot
|
||||||
|
|
|
@ -31,11 +31,8 @@ case "${1}" in
|
||||||
# Checking stage file
|
# Checking stage file
|
||||||
Check_stagefile .build/chroot_apt
|
Check_stagefile .build/chroot_apt
|
||||||
|
|
||||||
# Checking lock file
|
# Aquire lock file
|
||||||
Check_lockfile .lock
|
Acquire_lockfile
|
||||||
|
|
||||||
# Creating lock file
|
|
||||||
Create_lockfile .lock
|
|
||||||
|
|
||||||
mkdir -p chroot/etc/apt/apt.conf.d
|
mkdir -p chroot/etc/apt/apt.conf.d
|
||||||
|
|
||||||
|
@ -214,11 +211,8 @@ EOF
|
||||||
remove)
|
remove)
|
||||||
Echo_message "Deconfiguring file /etc/apt/apt.conf"
|
Echo_message "Deconfiguring file /etc/apt/apt.conf"
|
||||||
|
|
||||||
# Checking lock file
|
# Aquire lock file
|
||||||
Check_lockfile .lock
|
Acquire_lockfile
|
||||||
|
|
||||||
# Creating lock file
|
|
||||||
Create_lockfile .lock
|
|
||||||
|
|
||||||
# Deconfiguring aptitude ftp proxy
|
# Deconfiguring aptitude ftp proxy
|
||||||
rm -f chroot/etc/apt/apt.conf.d/00ftp-proxy
|
rm -f chroot/etc/apt/apt.conf.d/00ftp-proxy
|
||||||
|
|
|
@ -38,11 +38,8 @@ case "${1}" in
|
||||||
# Checking stage file
|
# Checking stage file
|
||||||
Check_stagefile .build/chroot_archives
|
Check_stagefile .build/chroot_archives
|
||||||
|
|
||||||
# Checking lock file
|
# Aquire lock file
|
||||||
Check_lockfile .lock
|
Acquire_lockfile
|
||||||
|
|
||||||
# Creating lock file
|
|
||||||
Create_lockfile .lock
|
|
||||||
|
|
||||||
# Restoring cache
|
# Restoring cache
|
||||||
Restore_package_cache chroot
|
Restore_package_cache chroot
|
||||||
|
@ -321,11 +318,8 @@ case "${1}" in
|
||||||
remove)
|
remove)
|
||||||
Echo_message "Deconfiguring file /etc/apt/sources.list"
|
Echo_message "Deconfiguring file /etc/apt/sources.list"
|
||||||
|
|
||||||
# Checking lock file
|
# Aquire lock file
|
||||||
Check_lockfile .lock
|
Acquire_lockfile
|
||||||
|
|
||||||
# Creating lock file
|
|
||||||
Create_lockfile .lock
|
|
||||||
|
|
||||||
# Restore top-level sources
|
# Restore top-level sources
|
||||||
if [ -e chroot/etc/apt/sources.list.d/zz-sources.list ]
|
if [ -e chroot/etc/apt/sources.list.d/zz-sources.list ]
|
||||||
|
|
|
@ -35,11 +35,8 @@ case "${1}" in
|
||||||
|
|
||||||
if [ -d cache/chroot ]
|
if [ -d cache/chroot ]
|
||||||
then
|
then
|
||||||
# Checking lock file
|
# Aquire lock file
|
||||||
Check_lockfile .lock
|
Acquire_lockfile
|
||||||
|
|
||||||
# Creating lock file
|
|
||||||
Create_lockfile .lock
|
|
||||||
|
|
||||||
# Removing old chroot
|
# Removing old chroot
|
||||||
rm -rf chroot
|
rm -rf chroot
|
||||||
|
@ -60,11 +57,8 @@ case "${1}" in
|
||||||
# Checking stage file
|
# Checking stage file
|
||||||
Check_stagefile .build/chroot_cache.save
|
Check_stagefile .build/chroot_cache.save
|
||||||
|
|
||||||
# Checking lock file
|
# Aquire lock file
|
||||||
Check_lockfile .lock
|
Acquire_lockfile
|
||||||
|
|
||||||
# Creating lock file
|
|
||||||
Create_lockfile .lock
|
|
||||||
|
|
||||||
rm -rf cache/chroot
|
rm -rf cache/chroot
|
||||||
|
|
||||||
|
|
|
@ -31,11 +31,8 @@ case "${1}" in
|
||||||
# Checking stage file
|
# Checking stage file
|
||||||
Check_stagefile .build/chroot_debianchroot
|
Check_stagefile .build/chroot_debianchroot
|
||||||
|
|
||||||
# Checking lock file
|
# Aquire lock file
|
||||||
Check_lockfile .lock
|
Acquire_lockfile
|
||||||
|
|
||||||
# Creating lock file
|
|
||||||
Create_lockfile .lock
|
|
||||||
|
|
||||||
if [ -f chroot/etc/debian_chroot ]
|
if [ -f chroot/etc/debian_chroot ]
|
||||||
then
|
then
|
||||||
|
@ -53,11 +50,8 @@ case "${1}" in
|
||||||
remove)
|
remove)
|
||||||
Echo_message "Deconfiguring file /etc/debian_chroot"
|
Echo_message "Deconfiguring file /etc/debian_chroot"
|
||||||
|
|
||||||
# Checking lock file
|
# Aquire lock file
|
||||||
Check_lockfile .lock
|
Acquire_lockfile
|
||||||
|
|
||||||
# Creating lock file
|
|
||||||
Create_lockfile .lock
|
|
||||||
|
|
||||||
if [ -f chroot/etc/debian_chroot.orig ]
|
if [ -f chroot/etc/debian_chroot.orig ]
|
||||||
then
|
then
|
||||||
|
|
|
@ -31,11 +31,8 @@ case "${1}" in
|
||||||
# Checking stage file
|
# Checking stage file
|
||||||
Check_stagefile .build/chroot_devpts
|
Check_stagefile .build/chroot_devpts
|
||||||
|
|
||||||
# Checking lock file
|
# Aquire lock file
|
||||||
Check_lockfile .lock
|
Acquire_lockfile
|
||||||
|
|
||||||
# Creating lock file
|
|
||||||
Create_lockfile .lock
|
|
||||||
|
|
||||||
# Creating mountpoint
|
# Creating mountpoint
|
||||||
mkdir -p chroot/dev/pts
|
mkdir -p chroot/dev/pts
|
||||||
|
@ -50,11 +47,8 @@ case "${1}" in
|
||||||
remove)
|
remove)
|
||||||
Echo_message "Begin unmounting /dev/pts..."
|
Echo_message "Begin unmounting /dev/pts..."
|
||||||
|
|
||||||
# Checking lock file
|
# Aquire lock file
|
||||||
Check_lockfile .lock
|
Acquire_lockfile
|
||||||
|
|
||||||
# Creating lock file
|
|
||||||
Create_lockfile .lock
|
|
||||||
|
|
||||||
# Unmounting /dev/pts
|
# Unmounting /dev/pts
|
||||||
if grep -qs "$(pwd)/chroot/dev/pts" /proc/mounts || Find_files chroot/dev/pts/*
|
if grep -qs "$(pwd)/chroot/dev/pts" /proc/mounts || Find_files chroot/dev/pts/*
|
||||||
|
|
|
@ -31,11 +31,8 @@ case "${1}" in
|
||||||
# Checking stage file
|
# Checking stage file
|
||||||
Check_stagefile .build/chroot_dpkg
|
Check_stagefile .build/chroot_dpkg
|
||||||
|
|
||||||
# Checking lock file
|
# Aquire lock file
|
||||||
Check_lockfile .lock
|
Acquire_lockfile
|
||||||
|
|
||||||
# Creating lock file
|
|
||||||
Create_lockfile .lock
|
|
||||||
|
|
||||||
# Create custom start-stop-daemon program
|
# Create custom start-stop-daemon program
|
||||||
Chroot chroot dpkg-divert --rename --quiet --add /sbin/start-stop-daemon
|
Chroot chroot dpkg-divert --rename --quiet --add /sbin/start-stop-daemon
|
||||||
|
@ -65,11 +62,8 @@ EOF
|
||||||
remove)
|
remove)
|
||||||
Echo_message "Deconfiguring file /sbin/start-stop-daemon"
|
Echo_message "Deconfiguring file /sbin/start-stop-daemon"
|
||||||
|
|
||||||
# Checking lock file
|
# Aquire lock file
|
||||||
Check_lockfile .lock
|
Acquire_lockfile
|
||||||
|
|
||||||
# Creating lock file
|
|
||||||
Create_lockfile .lock
|
|
||||||
|
|
||||||
# Manual hacks for special packages
|
# Manual hacks for special packages
|
||||||
|
|
||||||
|
|
|
@ -32,11 +32,8 @@ Require_stagefile .build/config .build/bootstrap
|
||||||
# Checking stage file
|
# Checking stage file
|
||||||
Check_stagefile .build/chroot_firmware
|
Check_stagefile .build/chroot_firmware
|
||||||
|
|
||||||
# Checking lock file
|
# Aquire lock file
|
||||||
Check_lockfile .lock
|
Acquire_lockfile
|
||||||
|
|
||||||
# Creating lock file
|
|
||||||
Create_lockfile .lock
|
|
||||||
|
|
||||||
# Checking depends
|
# Checking depends
|
||||||
Check_package host /usr/bin/wget wget
|
Check_package host /usr/bin/wget wget
|
||||||
|
|
|
@ -29,11 +29,8 @@ Require_stagefile .build/config .build/bootstrap
|
||||||
# Checking stage file
|
# Checking stage file
|
||||||
Check_stagefile .build/chroot_hacks
|
Check_stagefile .build/chroot_hacks
|
||||||
|
|
||||||
# Checking lock file
|
# Aquire lock file
|
||||||
Check_lockfile .lock
|
Acquire_lockfile
|
||||||
|
|
||||||
# Creating lock file
|
|
||||||
Create_lockfile .lock
|
|
||||||
|
|
||||||
case "${LIVE_IMAGE_TYPE}" in
|
case "${LIVE_IMAGE_TYPE}" in
|
||||||
netboot)
|
netboot)
|
||||||
|
|
|
@ -29,11 +29,8 @@ Require_stagefile .build/config .build/bootstrap
|
||||||
# Checking stage file
|
# Checking stage file
|
||||||
Check_stagefile .build/chroot_hooks
|
Check_stagefile .build/chroot_hooks
|
||||||
|
|
||||||
# Checking lock file
|
# Aquire lock file
|
||||||
Check_lockfile .lock
|
Acquire_lockfile
|
||||||
|
|
||||||
# Creating lock file
|
|
||||||
Create_lockfile .lock
|
|
||||||
|
|
||||||
## Processing distribution hooks
|
## Processing distribution hooks
|
||||||
|
|
||||||
|
|
|
@ -29,11 +29,8 @@ case "${1}" in
|
||||||
# Checking stage file
|
# Checking stage file
|
||||||
Check_stagefile .build/chroot_hostname
|
Check_stagefile .build/chroot_hostname
|
||||||
|
|
||||||
# Checking lock file
|
# Aquire lock file
|
||||||
Check_lockfile .lock
|
Acquire_lockfile
|
||||||
|
|
||||||
# Creating lock file
|
|
||||||
Create_lockfile .lock
|
|
||||||
|
|
||||||
# Create hostname file
|
# Create hostname file
|
||||||
Echo_message "Configuring file /etc/hostname"
|
Echo_message "Configuring file /etc/hostname"
|
||||||
|
@ -60,11 +57,8 @@ EOF
|
||||||
remove)
|
remove)
|
||||||
Echo_message "Deconfiguring file /etc/hostname"
|
Echo_message "Deconfiguring file /etc/hostname"
|
||||||
|
|
||||||
# Checking lock file
|
# Aquire lock file
|
||||||
Check_lockfile .lock
|
Acquire_lockfile
|
||||||
|
|
||||||
# Creating lock file
|
|
||||||
Create_lockfile .lock
|
|
||||||
|
|
||||||
# Copying hostname from includes, if existing
|
# Copying hostname from includes, if existing
|
||||||
if [ -e config/includes.chroot/etc/hostname ]
|
if [ -e config/includes.chroot/etc/hostname ]
|
||||||
|
|
|
@ -31,11 +31,8 @@ case "${1}" in
|
||||||
# Checking stage file
|
# Checking stage file
|
||||||
Check_stagefile .build/chroot_hosts
|
Check_stagefile .build/chroot_hosts
|
||||||
|
|
||||||
# Checking lock file
|
# Aquire lock file
|
||||||
Check_lockfile .lock
|
Acquire_lockfile
|
||||||
|
|
||||||
# Creating lock file
|
|
||||||
Create_lockfile .lock
|
|
||||||
|
|
||||||
if [ -f chroot/etc/hosts ]
|
if [ -f chroot/etc/hosts ]
|
||||||
then
|
then
|
||||||
|
@ -64,11 +61,8 @@ EOF
|
||||||
remove)
|
remove)
|
||||||
Echo_message "Deconfiguring file /etc/hosts"
|
Echo_message "Deconfiguring file /etc/hosts"
|
||||||
|
|
||||||
# Checking lock file
|
# Aquire lock file
|
||||||
Check_lockfile .lock
|
Acquire_lockfile
|
||||||
|
|
||||||
# Creating lock file
|
|
||||||
Create_lockfile .lock
|
|
||||||
|
|
||||||
if [ -e config/includes.chroot/etc/hosts ]
|
if [ -e config/includes.chroot/etc/hosts ]
|
||||||
then
|
then
|
||||||
|
|
|
@ -29,11 +29,8 @@ Require_stagefile .build/config .build/bootstrap
|
||||||
# Checking stage file
|
# Checking stage file
|
||||||
Check_stagefile .build/includes.chroot
|
Check_stagefile .build/includes.chroot
|
||||||
|
|
||||||
# Checking lock file
|
# Aquire lock file
|
||||||
Check_lockfile .lock
|
Acquire_lockfile
|
||||||
|
|
||||||
# Creating lock file
|
|
||||||
Create_lockfile .lock
|
|
||||||
|
|
||||||
if Find_files config/includes.chroot/
|
if Find_files config/includes.chroot/
|
||||||
then
|
then
|
||||||
|
|
|
@ -32,11 +32,8 @@ Require_stagefile .build/config .build/bootstrap
|
||||||
# Checking stage file
|
# Checking stage file
|
||||||
Check_stagefile .build/chroot_install-packages.${PASS}
|
Check_stagefile .build/chroot_install-packages.${PASS}
|
||||||
|
|
||||||
# Checking lock file
|
# Aquire lock file
|
||||||
Check_lockfile .lock
|
Acquire_lockfile
|
||||||
|
|
||||||
# Creating lock file
|
|
||||||
Create_lockfile .lock
|
|
||||||
|
|
||||||
# Check for packages specified with foreign architecture
|
# Check for packages specified with foreign architecture
|
||||||
_FOREIGN_ARCHITECTURES_FILE="chroot/root/packages.foreign-architectures"
|
_FOREIGN_ARCHITECTURES_FILE="chroot/root/packages.foreign-architectures"
|
||||||
|
|
|
@ -34,11 +34,8 @@ Require_stagefile .build/config .build/bootstrap
|
||||||
# Checking stage file
|
# Checking stage file
|
||||||
Check_stagefile .build/chroot_interactive
|
Check_stagefile .build/chroot_interactive
|
||||||
|
|
||||||
# Checking lock file
|
# Aquire lock file
|
||||||
Check_lockfile .lock
|
Acquire_lockfile
|
||||||
|
|
||||||
# Creating lock file
|
|
||||||
Create_lockfile .lock
|
|
||||||
|
|
||||||
case "${LB_INTERACTIVE}" in
|
case "${LB_INTERACTIVE}" in
|
||||||
true|shell)
|
true|shell)
|
||||||
|
|
|
@ -32,11 +32,8 @@ Require_stagefile .build/config .build/bootstrap
|
||||||
# Checking stage file
|
# Checking stage file
|
||||||
Check_stagefile .build/chroot_linux-image
|
Check_stagefile .build/chroot_linux-image
|
||||||
|
|
||||||
# Checking lock file
|
# Aquire lock file
|
||||||
Check_lockfile .lock
|
Acquire_lockfile
|
||||||
|
|
||||||
# Creating lock file
|
|
||||||
Create_lockfile .lock
|
|
||||||
|
|
||||||
# Diverting update-initramfs
|
# Diverting update-initramfs
|
||||||
#case "${LB_INITRAMFS}" in
|
#case "${LB_INITRAMFS}" in
|
||||||
|
|
|
@ -32,11 +32,8 @@ Require_stagefile .build/config .build/bootstrap
|
||||||
# Checking stage file
|
# Checking stage file
|
||||||
Check_stagefile .build/chroot_package-lists.${_PASS}
|
Check_stagefile .build/chroot_package-lists.${_PASS}
|
||||||
|
|
||||||
# Checking lock file
|
# Aquire lock file
|
||||||
Check_lockfile .lock
|
Acquire_lockfile
|
||||||
|
|
||||||
# Creating lock file
|
|
||||||
Create_lockfile .lock
|
|
||||||
|
|
||||||
# Handling local package lists
|
# Handling local package lists
|
||||||
if ! ( ls config/package-lists/*.list > /dev/null 2>&1 || \
|
if ! ( ls config/package-lists/*.list > /dev/null 2>&1 || \
|
||||||
|
|
|
@ -29,11 +29,8 @@ Require_stagefile .build/config .build/bootstrap
|
||||||
# Checking stage file
|
# Checking stage file
|
||||||
Check_stagefile .build/chroot_preseed
|
Check_stagefile .build/chroot_preseed
|
||||||
|
|
||||||
# Checking lock file
|
# Aquire lock file
|
||||||
Check_lockfile .lock
|
Acquire_lockfile
|
||||||
|
|
||||||
# Creating lock file
|
|
||||||
Create_lockfile .lock
|
|
||||||
|
|
||||||
if ls config/preseed/*.cfg > /dev/null 2>&1 || \
|
if ls config/preseed/*.cfg > /dev/null 2>&1 || \
|
||||||
ls config/preseed/*.cfg.chroot > /dev/null 2>&1 || \
|
ls config/preseed/*.cfg.chroot > /dev/null 2>&1 || \
|
||||||
|
|
|
@ -31,11 +31,8 @@ case "${1}" in
|
||||||
# Checking stage file
|
# Checking stage file
|
||||||
Check_stagefile .build/chroot_proc
|
Check_stagefile .build/chroot_proc
|
||||||
|
|
||||||
# Checking lock file
|
# Aquire lock file
|
||||||
Check_lockfile .lock
|
Acquire_lockfile
|
||||||
|
|
||||||
# Creating lock file
|
|
||||||
Create_lockfile .lock
|
|
||||||
|
|
||||||
# Creating mountpoint
|
# Creating mountpoint
|
||||||
mkdir -p chroot/proc
|
mkdir -p chroot/proc
|
||||||
|
@ -50,11 +47,8 @@ case "${1}" in
|
||||||
remove)
|
remove)
|
||||||
Echo_message "Begin unmounting /proc..."
|
Echo_message "Begin unmounting /proc..."
|
||||||
|
|
||||||
# Checking lock file
|
# Aquire lock file
|
||||||
Check_lockfile .lock
|
Acquire_lockfile
|
||||||
|
|
||||||
# Creating lock file
|
|
||||||
Create_lockfile .lock
|
|
||||||
|
|
||||||
# Workaround binfmt-support /proc locking
|
# Workaround binfmt-support /proc locking
|
||||||
if [ -e chroot/proc/sys/fs/binfmt_misc/status ]
|
if [ -e chroot/proc/sys/fs/binfmt_misc/status ]
|
||||||
|
|
|
@ -31,11 +31,8 @@ case "${1}" in
|
||||||
# Checking stage file
|
# Checking stage file
|
||||||
Check_stagefile .build/chroot_resolv
|
Check_stagefile .build/chroot_resolv
|
||||||
|
|
||||||
# Checking lock file
|
# Aquire lock file
|
||||||
Check_lockfile .lock
|
Acquire_lockfile
|
||||||
|
|
||||||
# Creating lock file
|
|
||||||
Create_lockfile .lock
|
|
||||||
|
|
||||||
if [ -e chroot/etc/resolv.conf ]
|
if [ -e chroot/etc/resolv.conf ]
|
||||||
then
|
then
|
||||||
|
@ -67,11 +64,8 @@ case "${1}" in
|
||||||
remove)
|
remove)
|
||||||
Echo_message "Deconfiguring file /etc/resolv.conf"
|
Echo_message "Deconfiguring file /etc/resolv.conf"
|
||||||
|
|
||||||
# Checking lock file
|
# Aquire lock file
|
||||||
Check_lockfile .lock
|
Acquire_lockfile
|
||||||
|
|
||||||
# Creating lock file
|
|
||||||
Create_lockfile .lock
|
|
||||||
|
|
||||||
if [ -e config/includes.chroot/etc/resolv.conf ]
|
if [ -e config/includes.chroot/etc/resolv.conf ]
|
||||||
then
|
then
|
||||||
|
|
|
@ -33,11 +33,8 @@ case "${1}" in
|
||||||
# Checking stage file
|
# Checking stage file
|
||||||
Check_stagefile .build/chroot_selinuxfs
|
Check_stagefile .build/chroot_selinuxfs
|
||||||
|
|
||||||
# Checking lock file
|
# Aquire lock file
|
||||||
Check_lockfile .lock
|
Acquire_lockfile
|
||||||
|
|
||||||
# Creating lock file
|
|
||||||
Create_lockfile .lock
|
|
||||||
|
|
||||||
# Create mountpoint
|
# Create mountpoint
|
||||||
mkdir -p chroot/sys/fs/selinux
|
mkdir -p chroot/sys/fs/selinux
|
||||||
|
@ -53,11 +50,8 @@ case "${1}" in
|
||||||
remove)
|
remove)
|
||||||
Echo_message "Begin unmounting /sys/fs/selinux..."
|
Echo_message "Begin unmounting /sys/fs/selinux..."
|
||||||
|
|
||||||
# Checking lock file
|
# Aquire lock file
|
||||||
Check_lockfile .lock
|
Acquire_lockfile
|
||||||
|
|
||||||
# Creating lock file
|
|
||||||
Create_lockfile .lock
|
|
||||||
|
|
||||||
# Unmounting /sys/fs/selinux
|
# Unmounting /sys/fs/selinux
|
||||||
if [ -e chroot/sys/fs/selinux/enforce ]
|
if [ -e chroot/sys/fs/selinux/enforce ]
|
||||||
|
|
|
@ -31,11 +31,8 @@ case "${1}" in
|
||||||
# Checking stage file
|
# Checking stage file
|
||||||
Check_stagefile .build/chroot_sysfs
|
Check_stagefile .build/chroot_sysfs
|
||||||
|
|
||||||
# Checking lock file
|
# Aquire lock file
|
||||||
Check_lockfile .lock
|
Acquire_lockfile
|
||||||
|
|
||||||
# Creating lock file
|
|
||||||
Create_lockfile .lock
|
|
||||||
|
|
||||||
# Create mountpoint
|
# Create mountpoint
|
||||||
mkdir -p chroot/sys
|
mkdir -p chroot/sys
|
||||||
|
@ -50,11 +47,8 @@ case "${1}" in
|
||||||
remove)
|
remove)
|
||||||
Echo_message "Begin unmounting /sys..."
|
Echo_message "Begin unmounting /sys..."
|
||||||
|
|
||||||
# Checking lock file
|
# Aquire lock file
|
||||||
Check_lockfile .lock
|
Acquire_lockfile
|
||||||
|
|
||||||
# Creating lock file
|
|
||||||
Create_lockfile .lock
|
|
||||||
|
|
||||||
# Unmounting /sys
|
# Unmounting /sys
|
||||||
if [ -e chroot/sys/class ]
|
if [ -e chroot/sys/class ]
|
||||||
|
|
|
@ -31,11 +31,8 @@ case "${1}" in
|
||||||
# Checking stage file
|
# Checking stage file
|
||||||
Check_stagefile .build/chroot_sysv-rc
|
Check_stagefile .build/chroot_sysv-rc
|
||||||
|
|
||||||
# Checking lock file
|
# Aquire lock file
|
||||||
Check_lockfile .lock
|
Acquire_lockfile
|
||||||
|
|
||||||
# Creating lock file
|
|
||||||
Create_lockfile .lock
|
|
||||||
|
|
||||||
if [ -e chroot/usr/sbin/policy-rc.d ]
|
if [ -e chroot/usr/sbin/policy-rc.d ]
|
||||||
then
|
then
|
||||||
|
@ -59,11 +56,8 @@ EOF
|
||||||
remove)
|
remove)
|
||||||
Echo_message "Deconfiguring file /usr/sbin/policy-rc.d"
|
Echo_message "Deconfiguring file /usr/sbin/policy-rc.d"
|
||||||
|
|
||||||
# Checking lock file
|
# Aquire lock file
|
||||||
Check_lockfile .lock
|
Acquire_lockfile
|
||||||
|
|
||||||
# Creating lock file
|
|
||||||
Create_lockfile .lock
|
|
||||||
|
|
||||||
# Remove custom policy-rc.d file
|
# Remove custom policy-rc.d file
|
||||||
rm -f chroot/usr/sbin/policy-rc.d
|
rm -f chroot/usr/sbin/policy-rc.d
|
||||||
|
|
|
@ -36,11 +36,8 @@ case "${1}" in
|
||||||
# Checking stage file
|
# Checking stage file
|
||||||
Check_stagefile .build/chroot_tmpfs
|
Check_stagefile .build/chroot_tmpfs
|
||||||
|
|
||||||
# Checking lock file
|
# Aquire lock file
|
||||||
Check_lockfile .lock
|
Acquire_lockfile
|
||||||
|
|
||||||
# Creating lock file
|
|
||||||
Create_lockfile .lock
|
|
||||||
|
|
||||||
mv chroot/var/lib/dpkg chroot/var/lib/dpkg.tmp
|
mv chroot/var/lib/dpkg chroot/var/lib/dpkg.tmp
|
||||||
mkdir chroot/var/lib/dpkg
|
mkdir chroot/var/lib/dpkg
|
||||||
|
@ -55,11 +52,8 @@ case "${1}" in
|
||||||
remove)
|
remove)
|
||||||
Echo_message "Deconfiguring tmpfs for /var/lib/dpkg"
|
Echo_message "Deconfiguring tmpfs for /var/lib/dpkg"
|
||||||
|
|
||||||
# Checking lock file
|
# Aquire lock file
|
||||||
Check_lockfile .lock
|
Acquire_lockfile
|
||||||
|
|
||||||
# Creating lock file
|
|
||||||
Create_lockfile .lock
|
|
||||||
|
|
||||||
mkdir -p chroot/var/lib/dpkg.tmp
|
mkdir -p chroot/var/lib/dpkg.tmp
|
||||||
mv chroot/var/lib/dpkg/* chroot/var/lib/dpkg.tmp
|
mv chroot/var/lib/dpkg/* chroot/var/lib/dpkg.tmp
|
||||||
|
|
|
@ -37,7 +37,7 @@ then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
rm -f .lock
|
Remove_lockfile
|
||||||
|
|
||||||
if [ -z "${1}" ]
|
if [ -z "${1}" ]
|
||||||
then
|
then
|
||||||
|
|
|
@ -54,11 +54,8 @@ Require_stagefile .build/config .build/bootstrap
|
||||||
# Checking stage file
|
# Checking stage file
|
||||||
Check_stagefile .build/installer_debian-installer
|
Check_stagefile .build/installer_debian-installer
|
||||||
|
|
||||||
# Checking lock file
|
# Aquire lock file
|
||||||
Check_lockfile .lock
|
Acquire_lockfile
|
||||||
|
|
||||||
# Creating lock file
|
|
||||||
Create_lockfile .lock
|
|
||||||
|
|
||||||
# Checking depends
|
# Checking depends
|
||||||
Check_package host /usr/bin/wget wget
|
Check_package host /usr/bin/wget wget
|
||||||
|
|
|
@ -33,11 +33,8 @@ Echo_message "Begin including local preseeds..."
|
||||||
# Checking stage file
|
# Checking stage file
|
||||||
Check_stagefile .build/installer_preseed
|
Check_stagefile .build/installer_preseed
|
||||||
|
|
||||||
# Checking lock file
|
# Aquire lock file
|
||||||
Check_lockfile .lock
|
Acquire_lockfile
|
||||||
|
|
||||||
# Creating lock file
|
|
||||||
Create_lockfile .lock
|
|
||||||
|
|
||||||
if ls config/preseed/*.cfg > /dev/null 2>&1 || \
|
if ls config/preseed/*.cfg > /dev/null 2>&1 || \
|
||||||
ls config/preseed/*.cfg.installer > /dev/null 2>&1 || \
|
ls config/preseed/*.cfg.installer > /dev/null 2>&1 || \
|
||||||
|
|
|
@ -32,11 +32,8 @@ Require_stagefile .build/config .build/source_debian
|
||||||
# Checking stage file
|
# Checking stage file
|
||||||
Check_stagefile .build/source_checksums
|
Check_stagefile .build/source_checksums
|
||||||
|
|
||||||
# Checking lock file
|
# Aquire lock file
|
||||||
Check_lockfile .lock
|
Acquire_lockfile
|
||||||
|
|
||||||
# Creating lock file
|
|
||||||
Create_lockfile .lock
|
|
||||||
|
|
||||||
for DIRECTORY in source/debian source/live
|
for DIRECTORY in source/debian source/live
|
||||||
do
|
do
|
||||||
|
|
|
@ -34,11 +34,8 @@ Require_stagefile .build/config .build/bootstrap
|
||||||
# Checking stage file
|
# Checking stage file
|
||||||
Check_stagefile .build/source_debian
|
Check_stagefile .build/source_debian
|
||||||
|
|
||||||
# Checking lock file
|
# Aquire lock file
|
||||||
Check_lockfile .lock
|
Acquire_lockfile
|
||||||
|
|
||||||
# Creating lock file
|
|
||||||
Create_lockfile .lock
|
|
||||||
|
|
||||||
# Remove old sources
|
# Remove old sources
|
||||||
if [ -d source/debian ]
|
if [ -d source/debian ]
|
||||||
|
|
|
@ -38,11 +38,8 @@ Require_stagefile .build/config .build/bootstrap
|
||||||
# Checking stage file
|
# Checking stage file
|
||||||
Check_stagefile .build/source_disk
|
Check_stagefile .build/source_disk
|
||||||
|
|
||||||
# Checking lock file
|
# Aquire lock file
|
||||||
Check_lockfile .lock
|
Acquire_lockfile
|
||||||
|
|
||||||
# Creating lock file
|
|
||||||
Create_lockfile .lock
|
|
||||||
|
|
||||||
mkdir -p source/.disk
|
mkdir -p source/.disk
|
||||||
|
|
||||||
|
|
|
@ -39,11 +39,8 @@ Require_stagefile .build/config .build/source_debian
|
||||||
# Checking stage file
|
# Checking stage file
|
||||||
Check_stagefile .build/source_hdd
|
Check_stagefile .build/source_hdd
|
||||||
|
|
||||||
# Checking lock file
|
# Aquire lock file
|
||||||
Check_lockfile .lock
|
Acquire_lockfile
|
||||||
|
|
||||||
# Creating lock file
|
|
||||||
Create_lockfile .lock
|
|
||||||
|
|
||||||
# Checking depends
|
# Checking depends
|
||||||
Check_package chroot /sbin/mkdosfs dosfstools
|
Check_package chroot /sbin/mkdosfs dosfstools
|
||||||
|
|
|
@ -29,11 +29,8 @@ Require_stagefile .build/config .build/bootstrap
|
||||||
# Checking stage file
|
# Checking stage file
|
||||||
Check_stagefile .build/source_hooks
|
Check_stagefile .build/source_hooks
|
||||||
|
|
||||||
# Checking lock file
|
# Aquire lock file
|
||||||
Check_lockfile .lock
|
Acquire_lockfile
|
||||||
|
|
||||||
# Creating lock file
|
|
||||||
Create_lockfile .lock
|
|
||||||
|
|
||||||
## Processing distribution hooks
|
## Processing distribution hooks
|
||||||
|
|
||||||
|
|
|
@ -43,11 +43,8 @@ Require_stagefile .build/config .build/source_debian
|
||||||
# Checking stage file
|
# Checking stage file
|
||||||
Check_stagefile .build/source_iso
|
Check_stagefile .build/source_iso
|
||||||
|
|
||||||
# Checking lock file
|
# Aquire lock file
|
||||||
Check_lockfile .lock
|
Acquire_lockfile
|
||||||
|
|
||||||
# Creating lock file
|
|
||||||
Create_lockfile .lock
|
|
||||||
|
|
||||||
# Checking depends
|
# Checking depends
|
||||||
Check_package chroot /usr/bin/xorriso xorriso
|
Check_package chroot /usr/bin/xorriso xorriso
|
||||||
|
|
|
@ -34,11 +34,8 @@ Require_stagefile .build/config .build/bootstrap
|
||||||
# Checking stage file
|
# Checking stage file
|
||||||
Check_stagefile .build/source_live
|
Check_stagefile .build/source_live
|
||||||
|
|
||||||
# Checking lock file
|
# Aquire lock file
|
||||||
Check_lockfile .lock
|
Acquire_lockfile
|
||||||
|
|
||||||
# Creating lock file
|
|
||||||
Create_lockfile .lock
|
|
||||||
|
|
||||||
# Remove old sources
|
# Remove old sources
|
||||||
if [ -d source/live ]
|
if [ -d source/live ]
|
||||||
|
|
|
@ -40,11 +40,8 @@ Require_stagefile .build/config .build/source_debian
|
||||||
# Checking stage file
|
# Checking stage file
|
||||||
Check_stagefile .build/source_tar
|
Check_stagefile .build/source_tar
|
||||||
|
|
||||||
# Checking lock file
|
# Aquire lock file
|
||||||
Check_lockfile .lock
|
Acquire_lockfile
|
||||||
|
|
||||||
# Creating lock file
|
|
||||||
Create_lockfile .lock
|
|
||||||
|
|
||||||
# Remove old source
|
# Remove old source
|
||||||
rm -f ${LIVE_IMAGE_NAME}-source.debian.tar.bz2 ${LIVE_IMAGE_NAME}-source.debian.tar.gz ${LIVE_IMAGE_NAME}-source.debian.tar.lz ${LIVE_IMAGE_NAME}-source.debian.tar
|
rm -f ${LIVE_IMAGE_NAME}-source.debian.tar.bz2 ${LIVE_IMAGE_NAME}-source.debian.tar.gz ${LIVE_IMAGE_NAME}-source.debian.tar.lz ${LIVE_IMAGE_NAME}-source.debian.tar
|
||||||
|
|
Loading…
Reference in New Issue