aboutsummaryrefslogblamecommitdiff
path: root/scripts/ovh_vps_ssd/arch_host_puppet_configuration_script.sh
blob: 35f46fd2d02ed56cb5a0568539051489b5d17331 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13












                                                                                                                     
                    
#!/bin/bash

git_branch="$1"
environment="$2"

DEVICE_STR=$(cat /proc/mounts | grep "/dev/[sv]d.. /mnt/")
DEVICE=$(echo "$DEVICE_STR" | cut -d' ' -f1)
MOUNTPOINT=$(echo "$DEVICE_STR" | cut -d' ' -f2)

cp /tmp/arch_puppet_configuration_script.sh "$MOUNTPOINT/root/"

/tmp/root.x86_64/bin/arch-chroot "$MOUNTPOINT" /root/arch_puppet_configuration_script.sh "$git_branch" "$environment"

umount "$MOUNTPOINT"