]> git.immae.eu Git - perso/Immae/Projets/Puppet.git/blob - scripts/ovh_vps_ssd/arch_host_puppet_configuration_script.sh
Merge branch 'dev'
[perso/Immae/Projets/Puppet.git] / scripts / ovh_vps_ssd / arch_host_puppet_configuration_script.sh
1 #!/bin/bash
2
3 git_branch="$1"
4 environment="$2"
5
6 DEVICE_STR=$(cat /proc/mounts | grep "/dev/[sv]d.. /mnt/")
7 DEVICE=$(echo "$DEVICE_STR" | cut -d' ' -f1)
8 MOUNTPOINT=$(echo "$DEVICE_STR" | cut -d' ' -f2)
9
10 cp /tmp/arch_puppet_configuration_script.sh "$MOUNTPOINT/root/"
11
12 /tmp/root.x86_64/bin/arch-chroot "$MOUNTPOINT" /root/arch_puppet_configuration_script.sh "$git_branch" "$environment"
13
14 umount "$MOUNTPOINT"