diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2018-03-16 00:22:38 +0100 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2018-03-16 18:08:12 +0100 |
commit | c15f2234474ff8a8266e26856702b3c561050667 (patch) | |
tree | 5df6dfb44ee2d37fbd9cf7b701bdc7881c575857 /scripts/ovh_vps_ssd/arch_host_puppet_configuration_script.sh | |
parent | 985b53a258ee18eaca8d437ae532c232a6d19921 (diff) | |
download | Puppet-c15f2234474ff8a8266e26856702b3c561050667.tar.gz Puppet-c15f2234474ff8a8266e26856702b3c561050667.tar.zst Puppet-c15f2234474ff8a8266e26856702b3c561050667.zip |
Move scripts to separate chunks
Diffstat (limited to 'scripts/ovh_vps_ssd/arch_host_puppet_configuration_script.sh')
-rwxr-xr-x | scripts/ovh_vps_ssd/arch_host_puppet_configuration_script.sh | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/scripts/ovh_vps_ssd/arch_host_puppet_configuration_script.sh b/scripts/ovh_vps_ssd/arch_host_puppet_configuration_script.sh new file mode 100755 index 0000000..dab8fac --- /dev/null +++ b/scripts/ovh_vps_ssd/arch_host_puppet_configuration_script.sh | |||
@@ -0,0 +1,13 @@ | |||
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 | |||