permission changes.
This commit is contained in:
@@ -1,21 +1,28 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "$(id -u)" -ne 0 ]; then
|
||||
echo "switching from $(id -un) to root"
|
||||
exec sudo "$0" "$@"
|
||||
fi
|
||||
|
||||
set -e
|
||||
cd "$(dirname "$0")"
|
||||
DIR="$(dirname "$0")"
|
||||
cd ..
|
||||
echo $PWD
|
||||
if [ ! -d "./outputs/root" ]; then
|
||||
|
||||
if [ ! -d ./outputs/root/bin ]; then
|
||||
rm -rf './outputs/root'
|
||||
mkdir -p ./outputs/root/
|
||||
debootstrap noble ./outputs/root http://archive.ubuntu.com/ubuntu
|
||||
debootstrap noble ./outputs/root https://us.archive.ubuntu.com/ubuntu
|
||||
fi
|
||||
rm -rf './outputs/chroot'
|
||||
mkdir -p ./outputs/chroot/
|
||||
rsync -av ./outputs/root/ ./outputs/chroot/
|
||||
mkdir -p ./outputs/chroot/proc
|
||||
|
||||
if mountpoint -q "./outputs/chroot/proc/"; then
|
||||
umount -lf "./outputs/chroot/proc/"
|
||||
fi
|
||||
mount --bind /proc ./outputs/chroot/proc
|
||||
cp ./config/filesystem_chroot_install.sh ./outputs/chroot/filesystem_chroot_install.sh
|
||||
chmod +x ./outputs/chroot/filesystem_chroot_install.sh
|
||||
|
||||
Reference in New Issue
Block a user