]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - test/test-efi-create-disk.sh
scope: on unified, make sure to unwatch all PIDs once they've been moved to the cgrou...
[thirdparty/systemd.git] / test / test-efi-create-disk.sh
index 0216c83c12d844d794e68cd7a34f6f234a095181..783b7874500dda96593fa3a8bb29f3e179b1b63c 100755 (executable)
@@ -1,11 +1,12 @@
-#!/bin/bash -e
+#!/usr/bin/env bash
+set -e
 
 out="$1"
 systemd_efi="$2"
 boot_stub="$3"
 splash_bmp="$4"
 if [ -z "$out" -o -z "$systemd_efi" -o -z "$boot_stub" -o -z "$splash_bmp" ]; then
-        exit 1
+    exit 1
 fi
 
 # create GPT table with EFI System Partition
@@ -27,12 +28,12 @@ cp "$systemd_efi" mnt/EFI/BOOT/BOOTX64.efi
 mkdir mnt/EFI/Linux
 echo -n "foo=yes bar=no root=/dev/fakeroot debug rd.break=initqueue" >mnt/cmdline.txt
 objcopy \
-        --add-section .osrel=/etc/os-release --change-section-vma .osrel=0x20000 \
-        --add-section .cmdline=mnt/cmdline.txt --change-section-vma .cmdline=0x30000 \
-        --add-section .splash="$splash_bmp" --change-section-vma .splash=0x40000 \
-        --add-section .linux=/boot/$(cat /etc/machine-id)/$(uname -r)/linux --change-section-vma .linux=0x2000000 \
-        --add-section .initrd=/boot/$(cat /etc/machine-id)/$(uname -r)/initrd --change-section-vma .initrd=0x3000000 \
-        "$boot_stub" mnt/EFI/Linux/linux-test.efi
+    --add-section .osrel=/etc/os-release --change-section-vma .osrel=0x20000 \
+    --add-section .cmdline=mnt/cmdline.txt --change-section-vma .cmdline=0x30000 \
+    --add-section .splash="$splash_bmp" --change-section-vma .splash=0x40000 \
+    --add-section .linux=/boot/$(cat /etc/machine-id)/$(uname -r)/linux --change-section-vma .linux=0x2000000 \
+    --add-section .initrd=/boot/$(cat /etc/machine-id)/$(uname -r)/initrd --change-section-vma .initrd=0x3000000 \
+    "$boot_stub" mnt/EFI/Linux/linux-test.efi
 
 # install entries
 mkdir -p mnt/loader/entries