Skip to content

Commit

Permalink
Move custom-bootbackup.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
leomeinel authored Aug 28, 2022
1 parent e9ae671 commit 1e62b2a
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -193,25 +193,8 @@ nvidia-xconfig

# Configure pacman hooks in /etc/pacman.d/hooks
mv /git/mdadm-encrypted-btrfs/etc/pacman.d/hooks /etc/pacman.d/
DISK1P1_UUID="$(lsblk -rno LABEL,MOUNTPOINT,UUID | grep "BOOT /boot" | sed 's/BOOT \/boot//' | tr -d "[:space:]")"
DISK2P1_UUID="$(lsblk -rno LABEL,MOUNTPOINT,UUID | grep "BOOT " | sed 's/BOOT //' | tr -d "[:space:]")"
{
echo '#!/bin/sh'
echo ''
echo '/usr/bin/rsync -aq --delete --mkpath /.boot.bak/ /.boot.bak.old'
echo '/usr/bin/rsync -aq --delete --mkpath /boot/ /.boot.bak'
echo 'if /usr/bin/mountpoint -q /boot'
echo 'then'
echo ' /usr/bin/umount -AR /boot'
echo 'fi'
echo "/usr/bin/mount UUID=$DISK2P1_UUID /boot"
echo '/usr/bin/rsync -aq --delete --mkpath /.boot.bak/ /boot'
echo '/usr/bin/umount /boot'
echo "/usr/bin/mount UUID=$DISK1P1_UUID /boot"
} > /etc/pacman.d/hooks/scripts/custom-bootbackup.sh
chmod -R 755 /etc/pacman.d/hooks
chmod 644 /etc/pacman.d/hooks/*.hook
chmod 744 /etc/pacman.d/hooks/scripts/*.sh

# Configure /etc/mkinitcpio.conf
sed -i 's/^MODULES=.*/MODULES=(btrfs)/;s/^HOOKS=.*/HOOKS=(base udev autodetect keyboard keymap consolefont modconf block mdadm_udev encrypt filesystems fsck)/' /etc/mkinitcpio.conf
Expand Down

0 comments on commit 1e62b2a

Please sign in to comment.