chiark / gitweb /
Remove src/journal-remote
[elogind.git] / src / kernel-install / 90-loaderentry.install
index a6a8abc2bd56198387717591259f843eff50dbf1..d433e00a5c3fc1508024431558d8c614d9c6c4d2 100644 (file)
@@ -32,6 +32,8 @@ fi
 
 if [[ -f /etc/os-release ]]; then
     . /etc/os-release
+elif [[ -f /usr/lib/os-release ]]; then
+    . /usr/lib/os-release
 fi
 
 if ! [[ $PRETTY_NAME ]]; then
@@ -45,11 +47,10 @@ if [[ -f /etc/kernel/cmdline ]]; then
 fi
 
 if ! [[ ${BOOT_OPTIONS[*]} ]]; then
-    readarray -t line < /proc/cmdline
-    for i in ${line[*]}; do
-        if [[ "${i#initrd=*}" == "$i" ]]; then
-            BOOT_OPTIONS[${#BOOT_OPTIONS[@]}]="$i"
-        fi
+    read -a line -r < /proc/cmdline
+    for i in "${line[@]}"; do
+        [[ "${i#initrd=*}" != "$i" ]] && continue
+        BOOT_OPTIONS[${#BOOT_OPTIONS[@]}]="$i"
     done
 fi