Commit 4d9d3a69 authored by Erwan BOUSSE's avatar Erwan BOUSSE
Browse files

Fix cp and dns in customization

parent dddb9222
......@@ -47,19 +47,23 @@ sudo vgscan
sudo vgchange -ay
sudo mount /dev/ubuntu-vg/ubuntu-lv /mnt
# Enable DNS in chroot
sudo cp /etc/resolv.conf /mnt/etc || true
# Copy and overwrite customization files in image root
if [ -d "$CUSTOMIZATION_FOLDER/files" ]; then
sudo cp -rfv "$CUSTOMIZATION_FOLDER/files/." /mnt
sudo cp -afv "$CUSTOMIZATION_FOLDER/files/." /mnt
fi
# Copy, chroot and run script, if any
if [ -f "$CUSTOMIZATION_FOLDER/run.sh" ]; then
# Enable DNS in chroot
sudo cp /etc/resolv.conf /mnt/etc || true
# Copy and run script
sudo cp "$CUSTOMIZATION_FOLDER/run.sh" /mnt/root
sudo chroot /mnt /bin/bash /root/run.sh
# Disable DNS in chroot
sudo rm /mnt/etc/resolv.conf || true
fi
# Cleanup and exit
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment