root@rtr:~ # apt install etckeeper tig git mc inxi sudo vim \ fwupd vlan nftables isc-dhcp-server chromium arp-scan \ arping nmap nmap-common rsync gpm btop tmux htop -y root@rtr:~ # echo "sysadmin ALL = NOPASSWD: ALL" > /etc/sudoers.d/sysadmin root@rtr:~ # cat /proc/mdstat root@rtr:~ # dpkg-reconfigure grub-pc grub-pc: Running grub-install ... Installing for i386-pc platform. Installation finished. No error reported. grub-install success for /dev/sda Installing for i386-pc platform. Installation finished. No error reported. grub-install success for /dev/sdb Installing for i386-pc platform. Installation finished. No error reported. grub-install success for /dev/sdc Installing for i386-pc platform. Installation finished. No error reported. grub-install success for /dev/sdd Generating grub configuration file ... Found linux image: /boot/vmlinuz-6.12.117+deb13-amd64 Found initrd image: /boot/initrd.img-6.12.117+deb13-amd64 Found linux image: /boot/vmlinuz-6.12.107+deb13-amd64 Found initrd image: /boot/initrd.img-6.12.107+deb13-amd64 Warning: os-prober will not be executed to detect other bootable partitions. Systems on them will not be added to the GRUB boot configuration. Check GRUB_DISABLE_OS_PROBER documentation entry. Adding boot menu entry for UEFI Firmware Settings ... done root@rtr:~# echo "sysadmin ALL = NOPASSWD: ALL" > /etc/sudoers.d/sysadmin root@rtr:~ # dpkg-reconfigure grub-pc root@rtr:~ # dpkg-reconfigure grub-pc root@rtr:~ # cd /etc/.git root@rtr:.git # git diff-tree --no-commit-id --name-only -r HEAD root@rtr:.git # cd root@rtr:~ # sudo tee /etc/etckeeper/commit.d/99-backup-changes << 'EOF' #!/bin/sh set -e # Define your backup root directory BACKUP_ROOT="/Backup" # Only run if we are inside /etc and it's a git repo if [ -d .git ]; then # Check if there were any changes committed in the last git commit (or check working tree) # Here we check if the HEAD commit modified any files CHANGED_FILES=$(git diff-tree --no-commit-id --name-only -r HEAD) if [ -n "$CHANGED_FILES" ]; then # Generate date-encoded timestamp (e.g., 2026-11-12T02-20) TIMESTAMP=$(date +%Y-%m-%d-%H-%M) DEST="$BACKUP_ROOT/$TIMESTAMP/etc" # Create destination directory mkdir -p "$DEST" # Copy only the files that were changed in this commit, maintaining directory structure echo "$CHANGED_FILES" | while read -r file; do if [ -f "$file" ]; then mkdir -p "$DEST/$(dirname "$file")" cp -p "$file" "$DEST/$file" fi done echo "etckeeper backup: Copied changed files to $DEST" fi fi EOF root@rtr:~ # sudo chmod a+x /etc/etckeeper/commit.d/99-backup-changes root@rtr:~ # cd /etc/ root@rtr:/etc # etckeeper commit "Testing etckeeper/commit.d/99-backup-changes script"