diff --git a/.github/release-nest-v3 b/.github/release-nest-v3 index d8263ee..e440e5c 100644 --- a/.github/release-nest-v3 +++ b/.github/release-nest-v3 @@ -1 +1 @@ -2 \ No newline at end of file +3 \ No newline at end of file diff --git a/pika-refind-btrfs-hooks/debian/changelog b/pika-refind-btrfs-hooks/debian/changelog index 5c48c9a..8a4cb2e 100644 --- a/pika-refind-btrfs-hooks/debian/changelog +++ b/pika-refind-btrfs-hooks/debian/changelog @@ -1,4 +1,4 @@ -pika-refind-btrfs-hooks (1.0-101pika1) pika; urgency=medium +pika-refind-btrfs-hooks (1.0-101pika2) pika; urgency=medium * Initial release. diff --git a/pika-refind-btrfs-hooks/debian/control b/pika-refind-btrfs-hooks/debian/control index 2639ea3..8314697 100644 --- a/pika-refind-btrfs-hooks/debian/control +++ b/pika-refind-btrfs-hooks/debian/control @@ -12,5 +12,9 @@ Depends: ${misc:Depends}, linux-base, refind, + refind-btrfs, + snapper, booster, +Recommends: + apt-btrfs-snapper, Description: refind-btrfs stanza generation hooks for PikaOS. diff --git a/pika-refind-btrfs-hooks/usr/bin/gen-pika-refind-btrfs-stanza b/pika-refind-btrfs-hooks/usr/bin/gen-pika-refind-btrfs-stanza old mode 100644 new mode 100755 index 861a66f..65f5312 --- a/pika-refind-btrfs-hooks/usr/bin/gen-pika-refind-btrfs-stanza +++ b/pika-refind-btrfs-hooks/usr/bin/gen-pika-refind-btrfs-stanza @@ -4,6 +4,11 @@ set -e export EFI_PATH=/boot/efi +if [ "$EUID" -ne 0 ] + then echo "Please run as root" + exit +fi + if [[ -f $EFI_PATH/EFI/refind/refind.conf ]] then export DO_STANDARD_REFIND_PATH=true @@ -25,23 +30,23 @@ fi create_entries() { REFIND_PATH="$1" - echo "Installing theme to: $REFIND_PATH" grep -qxF 'include pika-refind-btrfs.conf' $EFI_PATH/$REFIND_PATH/refind.conf || echo 'include pika-refind-btrfs.conf' >> $EFI_PATH/$REFIND_PATH/refind.conf rm -rfv $EFI_PATH/$REFIND_PATH/pika-refind-btrfs.conf || true for kernel_version in "$(linux-version list)" do - echo -e "menuentry \"PikaOS Snapper Stanza - $kernel_version\" {\n icon /EFI/BOOT/refind-dark/icons/os_pika.png\n volume \"PikaOS\"\n loader /vmlinuz-$kernel_version\n initrd /booster.img-$kernel_version\n options \"root=PARTUUID=$ROOT_PARTUUID $REFIND_CMDLINE_OPTIONS\"\n}" >> $EFI_PATH/$REFIND_PATH/pika-refind-btrfs.conf + echo "Creating refind stanza for: $kernel_version" + echo -e "menuentry \"PikaOS Snapper Stanza - $kernel_version\" {\n icon /EFI/BOOT/refind-dark/icons/os_pika.png\n volume \"PikaOS\"\n loader /vmlinuz-$kernel_version\n initrd /booster.img-$kernel_version\n options \"root=PARTUUID=$ROOT_PARTUUID $REFIND_CMDLINE_OPTIONS\"\n}" >> "$EFI_PATH/$REFIND_PATH/pika-refind-btrfs.conf" done } if [[ $DO_STANDARD_REFIND_PATH == true ]] then -echo "Standard Refind Path Detected" -create_entries "EFI/refind" + echo "Standard Refind Path Detected" + create_entries "EFI/refind" fi if [[ $DO_BOOTX64_REFIND_PATH == true ]] then -echo "Bootx64 Refind Path Detected" -create_entries "EFI/BOOT" -fi⏎ + echo "Bootx64 Refind Path Detected" + create_entries "EFI/BOOT" +fi \ No newline at end of file