]> git.proxmox.com Git - pve-kernel-meta.git/commitdiff
grub wrapper: move to simple space indentation and minimal whitespace cleanup
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 8 Jul 2021 07:27:15 +0000 (09:27 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 8 Jul 2021 07:27:15 +0000 (09:27 +0200)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
bin/grub-install-wrapper

index 2e70789266f2092e86dcf8a2bb2fbbe32ede35b8..2bdd99649a2688498eae444f780ac9953198a45c 100755 (executable)
@@ -1,39 +1,38 @@
 #! /bin/sh
+
 set -e
 
 . /usr/share/pve-kernel-helper/scripts/functions
 
 init_boot_disks() {
-       if ! (echo "${curr_uuid}" | grep -qE '[0-9a-fA-F]{4}-[0-9a-fA-F]{4}'); then
-               warn "WARN: ${curr_uuid} read from ${ESP_LIST} does not look like a VFAT-UUID - skipping"
-               return
-       fi
+    if ! (echo "${curr_uuid}" | grep -qE '[0-9a-fA-F]{4}-[0-9a-fA-F]{4}'); then
+        warn "WARN: ${curr_uuid} read from ${ESP_LIST} does not look like a VFAT-UUID - skipping"
+        return
+    fi
 
-       path="/dev/disk/by-uuid/$curr_uuid"
-       if [ ! -e "${path}" ]; then
-               warn "WARN: ${path} does not exist - clean '${ESP_LIST}'! - skipping"
-               return
-       fi
-       proxmox-boot-tool init "$path"
+    path="/dev/disk/by-uuid/$curr_uuid"
+    if [ ! -e "${path}" ]; then
+        warn "WARN: ${path} does not exist - clean '${ESP_LIST}'! - skipping"
+        return
+    fi
+    proxmox-boot-tool init "$path"
 }
 
 if proxmox-boot-tool status --quiet; then
-       #detect when being called by dpkg (e.g. grub-pc.postinst
-       if [ -n "$DPKG_RUNNING_VERSION" ] && \
-       echo "$DPKG_MAINTSCRIPT_PACKAGE" | grep -sq "^grub-"; then
-               MARKER_FILE="/tmp/proxmox-boot-tool.dpkg.marker"
-               if [ ! -e "$MARKER_FILE" ]; then
-                   warn "This system is booted via proxmox-boot-tool, running proxmox-boot-tool init for all configured bootdisks"
-                   loop_esp_list init_boot_disks
-                   touch "$MARKER_FILE"
-                   exit 0
-               else
-                   exit 0
-               fi
-       fi
-       warn "grub-install is disabled because this system is booted via proxmox-boot-tool, if you really need to run it, run /usr/sbin/grub-install.real"
-       exit 1
+    # detect when being called by dpkg (e.g. grub-pc.postinst
+    if [ -n "$DPKG_RUNNING_VERSION" ] && echo "$DPKG_MAINTSCRIPT_PACKAGE" | grep -sq "^grub-"; then
+            MARKER_FILE="/tmp/proxmox-boot-tool.dpkg.marker"
+            if [ ! -e "$MARKER_FILE" ]; then
+                warn "This system is booted via proxmox-boot-tool, running proxmox-boot-tool init for all configured bootdisks"
+                loop_esp_list init_boot_disks
+                touch "$MARKER_FILE"
+                exit 0
+            else
+                exit 0
+            fi
+    fi
+    warn "grub-install is disabled because this system is booted via proxmox-boot-tool, if you really need to run it, run /usr/sbin/grub-install.real"
+    exit 1
 else
-       grub-install.real "$@"
+    grub-install.real "$@"
 fi
-