diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2018-08-18 13:09:29 +0200 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2020-02-17 17:31:09 +0100 |
commit | 367c391a61091817cf34475f91a23ca286eec334 (patch) | |
tree | 616ee3d89d031032681844f5825c9d41eec8e9c0 /scripts/hetzner_server/arch_chroot_script.sh | |
parent | 64d41da73cce0005757ca0f7dd88151f9ba5cf4a (diff) | |
download | Puppet-367c391a61091817cf34475f91a23ca286eec334.tar.gz Puppet-367c391a61091817cf34475f91a23ca286eec334.tar.zst Puppet-367c391a61091817cf34475f91a23ca286eec334.zip |
Add hetzner server scripts
Diffstat (limited to 'scripts/hetzner_server/arch_chroot_script.sh')
-rwxr-xr-x | scripts/hetzner_server/arch_chroot_script.sh | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/scripts/hetzner_server/arch_chroot_script.sh b/scripts/hetzner_server/arch_chroot_script.sh new file mode 100755 index 0000000..afc78e2 --- /dev/null +++ b/scripts/hetzner_server/arch_chroot_script.sh | |||
@@ -0,0 +1,18 @@ | |||
1 | #!/bin/bash | ||
2 | |||
3 | pacman-key --init | ||
4 | pacman-key --populate archlinux | ||
5 | |||
6 | UUID=$(cat /device_uuid) | ||
7 | PART="/dev/disk/by-uuid/$UUID" | ||
8 | DEVICE=$(realpath "$PART") | ||
9 | |||
10 | mkfs.ext4 -F -U "$UUID" "$DEVICE" | ||
11 | mount "$DEVICE" /mnt | ||
12 | |||
13 | pacstrap -G /mnt base git puppet | ||
14 | |||
15 | echo "$PART / auto defaults 0 1" > /mnt/etc/fstab | ||
16 | |||
17 | umount /mnt | ||
18 | |||