From 5a95431ed5fa5f482afc7aa6217ac67fb3673522 Mon Sep 17 00:00:00 2001 From: Christian Rebischke <chris@nullday.de> Date: Fri, 11 Oct 2019 17:33:53 +0200 Subject: [PATCH] fixed format and syntax for various files Signed-off-by: Christian Rebischke <chris@nullday.de> --- controller.py | 2 +- generic-ci.sh | 2 +- http/install-chroot.sh | 12 ++++++------ http/install.sh | 2 +- provision/write_zeroes.sh | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/controller.py b/controller.py index c61e146..5126e34 100755 --- a/controller.py +++ b/controller.py @@ -1,5 +1,5 @@ #!/usr/bin/env python -#-*- encoding; utf-8 -*- +# -*- encoding; utf-8 -*- # # Author: Christian Rebischke <chris.rebischke@archlinux.org> # This file is licensed under GPLv3 diff --git a/generic-ci.sh b/generic-ci.sh index ef6b641..001fd78 100755 --- a/generic-ci.sh +++ b/generic-ci.sh @@ -17,7 +17,7 @@ case $1 in gpg --with-fingerprint --with-colons hashicorp.key | grep ${HASHICORP_FINGERPRINT^^} gpg --import hashicorp.key 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 unzip "packer_${PACKER_CURRENT_VERSION}_linux_amd64.zip" ./packer --version diff --git a/http/install-chroot.sh b/http/install-chroot.sh index cd15407..6f6c850 100644 --- a/http/install-chroot.sh +++ b/http/install-chroot.sh @@ -6,7 +6,7 @@ set -x ln -sf /usr/share/zoneinfo/UTC /etc/localtime sed -i -e 's/^#\(en_US.UTF-8\)/\1/' /etc/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 echo -e 'vagrant\nvagrant' | passwd @@ -14,7 +14,7 @@ useradd -m -U vagrant echo -e 'vagrant\nvagrant' | passwd vagrant # 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) { if (subject.isInGroup("vagrant")) { return polkit.Result.YES; @@ -23,7 +23,7 @@ polkit.addRule(function(action, subject) { EOF # setting sudo for vagrant user -cat <<EOF > /etc/sudoers.d/vagrant +cat <<EOF >/etc/sudoers.d/vagrant Defaults:vagrant !requiretty vagrant ALL=(ALL) NOPASSWD: ALL EOF @@ -39,7 +39,7 @@ chmod 0600 /home/vagrant/.ssh/authorized_keys ln -s /dev/null /etc/systemd/network/99-default.link # setup network -cat <<EOF > /etc/systemd/network/eth0.network +cat <<EOF >/etc/systemd/network/eth0.network [Match] Name=eth0 @@ -48,7 +48,7 @@ DHCP=ipv4 EOF # 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] Description=Initializes Pacman keyring Wants=haveged.service @@ -74,6 +74,6 @@ systemctl enable systemd-networkd systemctl enable systemd-resolved systemctl enable pacman-init.service -grub-install "$device" +grub-install sed -i -e 's/^GRUB_TIMEOUT=.*$/GRUB_TIMEOUT=1/' /etc/default/grub grub-mkconfig -o /boot/grub/grub.cfg diff --git a/http/install.sh b/http/install.sh index f545941..98a1221 100644 --- a/http/install.sh +++ b/http/install.sh @@ -27,7 +27,7 @@ mount "${device}2" /mnt pacstrap /mnt base linux grub openssh sudo polkit haveged swapon "${device}1" -genfstab -p /mnt >> /mnt/etc/fstab +genfstab -p /mnt >>/mnt/etc/fstab swapoff "${device}1" arch-chroot /mnt /bin/bash diff --git a/provision/write_zeroes.sh b/provision/write_zeroes.sh index a7fac3e..fc81c3d 100644 --- a/provision/write_zeroes.sh +++ b/provision/write_zeroes.sh @@ -1,4 +1,4 @@ -#/bin/bash +#!/bin/bash set -e set -x -- GitLab