Unverified Commit 5a95431e authored by Christian Rebischke's avatar Christian Rebischke
Browse files

fixed format and syntax for various files



Signed-off-by: default avatarChristian Rebischke <chris@nullday.de>
parent c19e835a
#!/usr/bin/env python #!/usr/bin/env python
#-*- encoding; utf-8 -*- # -*- encoding; utf-8 -*-
# #
# Author: Christian Rebischke <chris.rebischke@archlinux.org> # Author: Christian Rebischke <chris.rebischke@archlinux.org>
# This file is licensed under GPLv3 # This file is licensed under GPLv3
......
...@@ -17,7 +17,7 @@ case $1 in ...@@ -17,7 +17,7 @@ case $1 in
gpg --with-fingerprint --with-colons hashicorp.key | grep ${HASHICORP_FINGERPRINT^^} gpg --with-fingerprint --with-colons hashicorp.key | grep ${HASHICORP_FINGERPRINT^^}
gpg --import hashicorp.key gpg --import hashicorp.key
gpg --verify "packer_${PACKER_CURRENT_VERSION}_SHA256SUMS.sig" "packer_${PACKER_CURRENT_VERSION}_SHA256SUMS" gpg --verify "packer_${PACKER_CURRENT_VERSION}_SHA256SUMS.sig" "packer_${PACKER_CURRENT_VERSION}_SHA256SUMS"
grep linux_amd64 "packer_${PACKER_CURRENT_VERSION}_SHA256SUMS" > packer_SHA256SUM_linux_amd64 grep linux_amd64 "packer_${PACKER_CURRENT_VERSION}_SHA256SUMS" >packer_SHA256SUM_linux_amd64
sha256sum --check --status packer_SHA256SUM_linux_amd64 sha256sum --check --status packer_SHA256SUM_linux_amd64
unzip "packer_${PACKER_CURRENT_VERSION}_linux_amd64.zip" unzip "packer_${PACKER_CURRENT_VERSION}_linux_amd64.zip"
./packer --version ./packer --version
......
...@@ -6,7 +6,7 @@ set -x ...@@ -6,7 +6,7 @@ set -x
ln -sf /usr/share/zoneinfo/UTC /etc/localtime ln -sf /usr/share/zoneinfo/UTC /etc/localtime
sed -i -e 's/^#\(en_US.UTF-8\)/\1/' /etc/locale.gen sed -i -e 's/^#\(en_US.UTF-8\)/\1/' /etc/locale.gen
locale-gen locale-gen
echo 'LANG=en_US.UTF-8' > /etc/locale.conf echo 'LANG=en_US.UTF-8' >/etc/locale.conf
# setting vagrant user credentials # setting vagrant user credentials
echo -e 'vagrant\nvagrant' | passwd echo -e 'vagrant\nvagrant' | passwd
...@@ -14,7 +14,7 @@ useradd -m -U vagrant ...@@ -14,7 +14,7 @@ useradd -m -U vagrant
echo -e 'vagrant\nvagrant' | passwd vagrant echo -e 'vagrant\nvagrant' | passwd vagrant
# setting automatic authentication for any action requiring admin rights via Polkit # setting automatic authentication for any action requiring admin rights via Polkit
cat <<EOF > /etc/polkit-1/rules.d/49-nopasswd_global.rules cat <<EOF >/etc/polkit-1/rules.d/49-nopasswd_global.rules
polkit.addRule(function(action, subject) { polkit.addRule(function(action, subject) {
if (subject.isInGroup("vagrant")) { if (subject.isInGroup("vagrant")) {
return polkit.Result.YES; return polkit.Result.YES;
...@@ -23,7 +23,7 @@ polkit.addRule(function(action, subject) { ...@@ -23,7 +23,7 @@ polkit.addRule(function(action, subject) {
EOF EOF
# setting sudo for vagrant user # setting sudo for vagrant user
cat <<EOF > /etc/sudoers.d/vagrant cat <<EOF >/etc/sudoers.d/vagrant
Defaults:vagrant !requiretty Defaults:vagrant !requiretty
vagrant ALL=(ALL) NOPASSWD: ALL vagrant ALL=(ALL) NOPASSWD: ALL
EOF EOF
...@@ -39,7 +39,7 @@ chmod 0600 /home/vagrant/.ssh/authorized_keys ...@@ -39,7 +39,7 @@ chmod 0600 /home/vagrant/.ssh/authorized_keys
ln -s /dev/null /etc/systemd/network/99-default.link ln -s /dev/null /etc/systemd/network/99-default.link
# setup network # setup network
cat <<EOF > /etc/systemd/network/eth0.network cat <<EOF >/etc/systemd/network/eth0.network
[Match] [Match]
Name=eth0 Name=eth0
...@@ -48,7 +48,7 @@ DHCP=ipv4 ...@@ -48,7 +48,7 @@ DHCP=ipv4
EOF EOF
# Setup pacman-init.service for clean pacman keyring initialization # Setup pacman-init.service for clean pacman keyring initialization
cat <<EOF > /etc/systemd/system/pacman-init.service cat <<EOF >/etc/systemd/system/pacman-init.service
[Unit] [Unit]
Description=Initializes Pacman keyring Description=Initializes Pacman keyring
Wants=haveged.service Wants=haveged.service
...@@ -74,6 +74,6 @@ systemctl enable systemd-networkd ...@@ -74,6 +74,6 @@ systemctl enable systemd-networkd
systemctl enable systemd-resolved systemctl enable systemd-resolved
systemctl enable pacman-init.service systemctl enable pacman-init.service
grub-install "$device" grub-install
sed -i -e 's/^GRUB_TIMEOUT=.*$/GRUB_TIMEOUT=1/' /etc/default/grub sed -i -e 's/^GRUB_TIMEOUT=.*$/GRUB_TIMEOUT=1/' /etc/default/grub
grub-mkconfig -o /boot/grub/grub.cfg grub-mkconfig -o /boot/grub/grub.cfg
...@@ -27,7 +27,7 @@ mount "${device}2" /mnt ...@@ -27,7 +27,7 @@ mount "${device}2" /mnt
pacstrap /mnt base linux grub openssh sudo polkit haveged pacstrap /mnt base linux grub openssh sudo polkit haveged
swapon "${device}1" swapon "${device}1"
genfstab -p /mnt >> /mnt/etc/fstab genfstab -p /mnt >>/mnt/etc/fstab
swapoff "${device}1" swapoff "${device}1"
arch-chroot /mnt /bin/bash arch-chroot /mnt /bin/bash
#/bin/bash #!/bin/bash
set -e set -e
set -x set -x
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment