aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md4
-rwxr-xr-xshare/hydractl/provision50
2 files changed, 27 insertions, 27 deletions
diff --git a/README.md b/README.md
index 23073b6..b102146 100644
--- a/README.md
+++ b/README.md
@@ -28,7 +28,7 @@ Then check the source integrity of the latest release:
Finally, add hydra folder to your `$PATH` or run the following command to install
it under `/usr/local`:
- ./hydractl deploy
+ ./hydractl install
Managing an existing network
----------------------------
@@ -54,4 +54,4 @@ Major direct upstreams:
* [https://www.debian.org Debian].
* [http://docs.puppetlabs.com Puppet].
-* [Shared Puppet Modules Initiative](https://labs.riseup.net/code/projects/sharedpuppetmodules).
+* [Shared Puppet Modules Initiative](https://gitlab.com/groups/shared-puppet-modules-group).
diff --git a/share/hydractl/provision b/share/hydractl/provision
index 53cab77..a5191be 100755
--- a/share/hydractl/provision
+++ b/share/hydractl/provision
@@ -288,20 +288,20 @@ echo "Applying initial configuration..."
hydra_sudo_run mount none -t proc $WORK/proc
hydra_sudo_run mount none -t sysfs $WORK/sys
hydra_sudo_run mount -o bind /dev/ $WORK/dev
-echo LANG=C | $SUDO tee $WORK/etc/default/locale
+echo LANG=C | $SUDO tee $WORK/etc/default/locale > /dev/null
# Resolver configuration.
-echo "domain $domain" | $SUDO tee $WORK/etc/resolv.conf
-echo "search $hostname.$domain" | $SUDO tee -a $WORK/etc/resolv.conf
-grep nameserver /etc/resolv.conf | $SUDO tee -a $WORK/etc/resolv.conf
+echo "domain $domain" | $SUDO tee $WORK/etc/resolv.conf > /dev/null
+echo "search $hostname.$domain" | $SUDO tee -a $WORK/etc/resolv.conf > /dev/null
+grep nameserver /etc/resolv.conf | $SUDO tee -a $WORK/etc/resolv.conf > /dev/null
# Hostname configuration.
-echo $hostname.$domain | $SUDO tee $WORK/etc/hostname
-echo "127.0.0.1 localhost" | $SUDO tee -a $WORK/etc/hosts
-echo "127.0.0.1 $hostname $hostname.$domain" | $SUDO tee -a $WORK/etc/hosts
+echo $hostname.$domain | $SUDO tee $WORK/etc/hostname > /dev/null
+echo "127.0.0.1 localhost" | $SUDO tee -a $WORK/etc/hosts > /dev/null
+echo "127.0.0.1 $hostname $hostname.$domain" | $SUDO tee -a $WORK/etc/hosts > /dev/null
# Invert hostname contents to avoid http://projects.puppetlabs.com/issues/2533
-tac $WORK/etc/hosts | $SUDO tee $WORK/etc/hosts.new
+tac $WORK/etc/hosts | $SUDO tee $WORK/etc/hosts.new > /dev/null
hydra_sudo_run mv $WORK/etc/hosts.new $WORK/etc/hosts
# Initial upgrade.
@@ -312,64 +312,64 @@ hydra_sudo_run chroot $WORK/ apt-get install locales cryptsetup lvm2 initramfs-t
# Crypttab.
echo "Configuring crypttab..."
-echo "# <target name> <source device> <key file> <options>" | $SUDO tee $WORK/etc/crypttab
+echo "# <target name> <source device> <key file> <options>" | $SUDO tee $WORK/etc/crypttab > /dev/null
if [ "$encrypt" == "y" ]; then
- cat <<-EOF | $SUDO tee $WORK/etc/crypttab
+ cat <<-EOF | $SUDO tee $WORK/etc/crypttab > /dev/null
root /dev/mapper/$vg-root none luks
EOF
fi
if [ "$home_size" != "0" ] && [ "$encrypt" == "y" ]; then
- cat <<-EOF | $SUDO tee -a $WORK/etc/crypttab
+ cat <<-EOF | $SUDO tee -a $WORK/etc/crypttab > /dev/null
home /dev/mapper/$vg-home none luks
EOF
fi
if [ "$var_size" != "0" ] && [ "$encrypt" == "y" ]; then
- cat <<-EOF | $SUDO tee -a $WORK/etc/crypttab
+ cat <<-EOF | $SUDO tee -a $WORK/etc/crypttab > /dev/null
var /dev/mapper/$vg-var none luks
EOF
fi
if [ "$swap_size" != "0" ] && [ "$random_swap" == "y" ]; then
- cat <<-EOF | $SUDO tee -a $WORK/etc/crypttab
+ cat <<-EOF | $SUDO tee -a $WORK/etc/crypttab > /dev/null
swap /dev/mapper/$vg-swap /dev/random swap,cipher=aes-xts-plain64:sha256
EOF
fi
if [ "$swap_size" != "0" ] && [ "$random_swap" != "y" ]; then
- cat <<-EOF | $SUDO tee -a $WORK/etc/crypttab
+ cat <<-EOF | $SUDO tee -a $WORK/etc/crypttab > /dev/null
swap /dev/mapper/$vg-swap none luks,swap
EOF
fi
# Fstab.
echo "Configuring fstab..."
-echo "" | $SUDO tee $WORK/etc/fstab
+echo "" | $SUDO tee $WORK/etc/fstab > /dev/null
if [ "$swap_size" != "0" ]; then
- cat <<-EOF | $SUDO tee -a $WORK/etc/fstab
+ cat <<-EOF | $SUDO tee -a $WORK/etc/fstab > /dev/null
/dev/mapper/swap none swap sw 0 0
EOF
fi
if [ "$encrypt" == "y" ]; then
- cat <<-EOF | $SUDO tee -a $WORK/etc/fstab
+ cat <<-EOF | $SUDO tee -a $WORK/etc/fstab > /dev/null
/dev/mapper/root / ext4 defaults,errors=remount-ro 0 1
EOF
else
- cat <<-EOF | $SUDO tee -a $WORK/etc/fstab
+ cat <<-EOF | $SUDO tee -a $WORK/etc/fstab > /dev/null
/dev/mapper/$vg-root / ext4 defaults,errors=remount-ro 0 1
EOF
fi
if [ "$home_size" != "0" ]; then
if [ "$encrypt" == "y" ]; then
- cat <<-EOF | $SUDO tee -a $WORK/etc/fstab
+ cat <<-EOF | $SUDO tee -a $WORK/etc/fstab > /dev/null
/dev/mapper/home /home ext4 defaults,errors=remount-ro 0 2
EOF
else
- cat <<-EOF | $SUDO tee -a $WORK/etc/fstab
+ cat <<-EOF | $SUDO tee -a $WORK/etc/fstab > /dev/null
/dev/mapper/$vg-home /home ext4 defaults,errors=remount-ro 0 2
EOF
fi
@@ -377,11 +377,11 @@ fi
if [ "$var_size" != "0" ]; then
if [ "$encrypt" == "y" ]; then
- cat <<-EOF | $SUDO tee -a $WORK/etc/fstab
+ cat <<-EOF | $SUDO tee -a $WORK/etc/fstab > /dev/null
/dev/mapper/var /var ext4 defaults,errors=remount-ro 0 2
EOF
else
- cat <<-EOF | $SUDO tee -a $WORK/etc/fstab
+ cat <<-EOF | $SUDO tee -a $WORK/etc/fstab > /dev/null
/dev/mapper/$vg-var /var ext4 defaults,errors=remount-ro 0 2
EOF
fi
@@ -392,7 +392,7 @@ if [ "$grub" == "y" ]; then
echo "Boot device setup..."
hydra_sudo_run mkfs.ext4 $boot_device
hydra_sudo_run mount $boot_device $WORK/boot
- echo "$reboot_device /boot ext4 defaults,errors=remount-ro 0 2" | $SUDO tee -a $WORK/etc/fstab
+ echo "$reboot_device /boot ext4 defaults,errors=remount-ro 0 2" | $SUDO tee -a $WORK/etc/fstab > /dev/null
echo "Setting up GRUB..."
hydra_sudo_run chroot $WORK/ apt-get install grub-pc -y
@@ -400,7 +400,7 @@ fi
# Kernel.
echo "Installing kernel..."
-cat <<-EOF | $SUDO tee $WORK/etc/initramfs-tools/modules
+cat <<-EOF | $SUDO tee $WORK/etc/initramfs-tools/modules > /dev/null
dm-mod
dm-crypt
dm-raid
@@ -409,7 +409,7 @@ twofish
sha256
EOF
-cat <<-EOF | $SUDO tee $WORK/etc/kernel-img.conf
+cat <<-EOF | $SUDO tee $WORK/etc/kernel-img.conf > /dev/null
do_initrd = Yes
EOF