This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{# If there were any files missing on the remote host then remove them from #} | |
{# the files_of_interest list using the "difference" filter. #} | |
{% if missing_files_of_interest | length > 0 %} | |
{% set files_of_interest = files_of_interest | difference(missing_files_of_interest) %} | |
############################################################################ | |
# The following files were configured but don't exist on this host right now: | |
{% for file in missing_files_of_interest %} | |
# {{ file }} | |
{% endfor %} | |
############################################################################ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# bash v4 required because of associative array below. | |
# networkd-dispatcher hook script that sets every IPv6 address on the system to | |
# have preferred_lft 0. Put it in for example in | |
# /etc/networkd-dispatcher/routable.d/50-set-preferred-lft and make sure it's | |
# executable and owned by root:root. | |
# | |
# There's an associative array below where you can list addresses NOT to |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Started off being just the git/svn stuff from authors below but then got | |
# hacked on by me to add other silly things. | |
# | |
# Needs: | |
# - A 256-colour terminal | |
# - A terminal that supports colour emoji (else you'll need to substitute boring monochrome unicode glyphs and maybe colour them with terminal escapes) | |
# - Powerline font ("fonts-powerline" on Debian/Ubuntu) for the separator chevrons | |
# - Add this to your ~/.bashrc like: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Dumb script to resolve a list of IPs to their reverse DNS and AS details. | |
# | |
# This directly calls whois against whois.cymru.com for each line of input | |
# so if you're going to run it with hundreds of lines of input, maybe don't | |
# do that and use their DNS zone instead. | |
# | |
# Usage | |
# Pipe a list of counts and IP addresses through me like: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Paste at shell prompt (or download and execute) and get: | |
# | |
# sdc 9936 hours ( 1.13 years) 3.49TiB SAMSUNG MZ7KH3T8 | |
# nvme0n1 9936 hours ( 1.13 years) 3.49TiB SAMSUNG MZQLB3T8HALS-00007 | |
# sde 9932 hours ( 1.13 years) 4.55TiB ST5000LM000-2AN1 | |
# sdd 9931 hours ( 1.13 years) 4.55TiB ST5000LM000-2AN1 | |
# sdb 9617 hours ( 1.09 years) 0.01TiB SuperMicro SSD | |
# sda 9616 hours ( 1.09 years) 0.01TiB SuperMicro SSD |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# shaper.sh eth1 clear # removes traffic shaping | |
# shaper.sh eth1 1000 # shapes eth1 to 1Mbit/s in both directions | |
# Andy Smith <[email protected]> | |
intf="$1" | |
bw="$2" | |
ifb="ifb0" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Keep two different EFI System Partitions (ESP) in sync, because it's 2021 and | |
# EFI still doesn't support software RAID properly. The idea being to add boot | |
# entries for both: | |
# | |
# $esp1/grubx64.efi | |
# | |
# …and: | |
# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -Naur a/usr/lib/live/boot/9990-networking.sh b/usr/lib/live/boot/9990-networking.sh | |
--- a/usr/lib/live/boot/9990-networking.sh 2022-01-28 21:16:07.880622551 +0000 | |
+++ b/usr/lib/live/boot/9990-networking.sh 2022-01-28 21:15:40.504719118 +0000 | |
@@ -104,16 +104,25 @@ | |
fi | |
done | |
else | |
- for interface in ${DEVICE}; do | |
- ipconfig -t "$ETHDEV_TIMEOUT" "${interface}" | tee "/netboot-${interface}.config" | |
- |