|
| 1 | +uid := `id -u` |
| 2 | +shell := `grep :$(id -u): /etc/passwd | cut -d: -f7` |
| 3 | + |
| 4 | +# Boot into this device's BIOS/UEFI screen |
| 5 | +bios: |
| 6 | + #!/usr/bin/bash |
| 7 | + if [ -d /sys/firmware/efi ]; then |
| 8 | + systemctl reboot --firmware-setup |
| 9 | + else |
| 10 | + echo "Rebooting to legacy BIOS from OS is not supported." |
| 11 | + fi |
| 12 | + |
| 13 | +# Show BIOS info |
| 14 | +bios-info: |
| 15 | + #!/usr/bin/bash |
| 16 | + echo "Manufacturer: $(sudo dmidecode -s baseboard-manufacturer)" |
| 17 | + echo "Product Name: $(sudo dmidecode -s baseboard-product-name)" |
| 18 | + echo "Version: $(sudo dmidecode -s bios-version)" |
| 19 | + echo "Release Date: $(sudo dmidecode -s bios-release-date)" |
| 20 | + |
| 21 | +# Show all messages from this boot |
| 22 | +logs-this-boot: |
| 23 | + sudo journalctl --no-hostname -b 0 |
| 24 | + |
| 25 | +# Show all messages from last boot |
| 26 | +logs-last-boot: |
| 27 | + sudo journalctl --no-hostname -b -1 |
| 28 | + |
| 29 | +# Check for local overrides |
| 30 | +check-local-overrides: |
| 31 | + #!/usr/bin/bash |
| 32 | + diff -r \ |
| 33 | + --suppress-common-lines \ |
| 34 | + --color="always" \ |
| 35 | + --exclude "passwd*" \ |
| 36 | + --exclude "group*" \ |
| 37 | + --exclude="subgid*" \ |
| 38 | + --exclude="subuid*" \ |
| 39 | + --exclude="machine-id" \ |
| 40 | + --exclude="adjtime" \ |
| 41 | + --exclude="fstab" \ |
| 42 | + --exclude="system-connections" \ |
| 43 | + --exclude="shadow*" \ |
| 44 | + --exclude="gshadow*" \ |
| 45 | + --exclude="ssh_host*" \ |
| 46 | + --exclude="cmdline" \ |
| 47 | + --exclude="crypttab" \ |
| 48 | + --exclude="hostname" \ |
| 49 | + --exclude="localtime" \ |
| 50 | + --exclude="locale*" \ |
| 51 | + --exclude="*lock" \ |
| 52 | + --exclude=".updated" \ |
| 53 | + --exclude="*LOCK" \ |
| 54 | + --exclude="vconsole*" \ |
| 55 | + --exclude="00-keyboard.conf" \ |
| 56 | + --exclude="grub" \ |
| 57 | + --exclude="system.control*" \ |
| 58 | + --exclude="cdi" \ |
| 59 | + --exclude="default.target" \ |
| 60 | + /usr/etc /etc 2>/dev/null | sed '/Binary\ files\ /d' |
| 61 | + |
| 62 | +# Gather device info to a pastebin |
| 63 | +device-info: |
| 64 | + #!/usr/bin/bash |
| 65 | + fpaste <(rpm-ostree status) <(fpaste --sysinfo --printonly) <(flatpak list --columns=application,version,options) |
| 66 | + |
| 67 | +# Measure Idle Power Draw |
| 68 | +check-idle-power-draw: |
| 69 | + #!/usr/bin/bash |
| 70 | + sudo powerstat -a -r |
0 commit comments