diff --git a/arch_post_update_update_boot.sh b/arch_post_update_update_boot.sh index 95637ce..5924cbb 100755 --- a/arch_post_update_update_boot.sh +++ b/arch_post_update_update_boot.sh @@ -2,10 +2,10 @@ set -xe AURA_BIN=/usr/bin/aura CURRENT_VERSION=`${AURA_BIN} -Qi linux | sed -n '/^Version *:/p' | grep -o '[^ ]*$'` -BOOT_BLK=/dev/vg1/boot +BOOT_BLK=/dev/vg0/boot BOOT_ORIG=/boot BOOT_DST=/mnt/boot -ARCH_BOOT_DST=$BOOT_DST/arch +ARCH_BOOT_DST=$BOOT_DST/archlinux ARCH_BOOT_DST_CURRENT_VERSION=$ARCH_BOOT_DST/$CURRENT_VERSION ARCH_INITRAMFS=initramfs-linux.img ARCH_INITRAMFS_FALLBACK=initramfs-linux-fallback.img diff --git a/chroot.sh b/chroot.sh new file mode 100755 index 0000000..a98dd55 --- /dev/null +++ b/chroot.sh @@ -0,0 +1,7 @@ +mount --rbind /dev /mnt/chroot/dev +mount --make-rslave /mnt/chroot/dev +mount -t proc /proc /mnt/chroot/proc +mount --rbind /sys /mnt/chroot/sys +mount --make-rslave /mnt/chroot/sys +mount --rbind /tmp /mnt/chroot/tmp +mount --bind /run /mnt/chroot/run diff --git a/output_hdmi.sh b/output_hdmi.sh new file mode 100755 index 0000000..589eef1 --- /dev/null +++ b/output_hdmi.sh @@ -0,0 +1 @@ +xrandr --output HDMI-1-0 --right-of eDP-1 --auto diff --git a/setup_lxd_network.sh b/setup_lxd_network.sh new file mode 100755 index 0000000..dc92fd6 --- /dev/null +++ b/setup_lxd_network.sh @@ -0,0 +1,25 @@ +#!/bin/sh +set -x + +if [[ $1 = "up" ]] +then + ip link add name virbr0 type bridge + ip link set up dev virbr0 + ip addr add 10.0.0.1/8 dev virbr0 + ip route append default via 10.0.0.1 dev virbr0 + + nft add table inet nat + nft add chain inet nat postrouting '{ type nat hook postrouting priority 100 ; }' + nft add rule inet nat postrouting oifname wlan0 masquerade + nft add rule inet filter forward ct state related,established accept + nft add rule inet filter forward iifname virbr0 oifname wlan0 accept +elif [[ $1 = "down" ]] +then + nft delete rule inet filter forward iifname virbr0 oifname wlan0 accept + nft delete rule inet filter forward ct state related,established accept + nft delete table inet nat + + ip link del virbr0 +else + echo "Use the 'up' or 'down' command" +fi diff --git a/snapshot-rootfs.sh b/snapshot-rootfs.sh new file mode 100755 index 0000000..7ec50b3 --- /dev/null +++ b/snapshot-rootfs.sh @@ -0,0 +1,8 @@ +#!/usr/bin/bash + +VG=vg0 +ROOTFS=rootfs-arch +SZ=10G +DATE=`date +%Y%m%dT%H%M` + +lvcreate -n $ROOTFS-$DATE --snapshot -L $SZ $VG/$ROOTFS