diff options
Diffstat (limited to 'share/hydractl/provision-chroot')
-rwxr-xr-x | share/hydractl/provision-chroot | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/share/hydractl/provision-chroot b/share/hydractl/provision-chroot index 7910879..bd7430a 100755 --- a/share/hydractl/provision-chroot +++ b/share/hydractl/provision-chroot @@ -34,26 +34,30 @@ function hydra_provision_config { # Load configuration hydra_provision_config_load $1 +# Get config parameters. +hydra_provision_config + # Parameters WORK="$folder" CHROOT="hydra_sudo_run chroot $WORK" -# Get config parameters. -hydra_provision_config - # Check for requirements. for req in debootstrap qemu-user-static; do hydra_install_package $req done hydra_sudo_run mkdir -p /var/chroot -hydra_sudo_run sudo debootstrap --variant=minbase --arch $arch $version $WORK $mirror +hydra_sudo_run debootstrap --variant=minbase --arch $arch $version $WORK $mirror # Arch specific procedures -if [ "$arch" != "armel" ] && [ "$arch" != "armhf" ]; then +if [ "$arch" == "armel" ] || [ "$arch" == "armhf" ]; then + if [ ! -f '/usr/bin/qemu-arm-static' ]; then + hydra_sudo run apt-get install qemu-user-static + fi + hydra_sudo_run cp /usr/bin/qemu-arm-static $WORK/usr/bin/ $CHROOT /debootstrap/debootstrap --second-stage fi -echo "$hostname.$domain" | hydra_sudo_run tee /var/chroot/squeeze/etc/hostname > /dev/null +echo "$hostname.$domain" | hydra_sudo_run tee $WORK/etc/hostname > /dev/null $CHROOT apt-get install locales |