[neon/neon/calamares-settings/Neon/release] oem-prepare/usr/sbin: route dmidecode through pkexec

Harald Sitter null at kde.org
Wed Jul 6 09:48:27 BST 2022


Git commit efb68b6a9c3783f6ce2078bc87055698f0ef3179 by Harald Sitter.
Committed on 06/07/2022 at 08:46.
Pushed by sitter into branch 'Neon/release'.

route dmidecode through pkexec

if I am not mistaken we run the OEM calamares as a user that has pkexec
enabled but is not itself root, so we need to route the call through
pkexec to get actual output

M  +2    -2    oem-prepare/usr/sbin/calamares-oem-slimbook-proxamd5

https://invent.kde.org/neon/neon/calamares-settings/commit/efb68b6a9c3783f6ce2078bc87055698f0ef3179

diff --git a/oem-prepare/usr/sbin/calamares-oem-slimbook-proxamd5 b/oem-prepare/usr/sbin/calamares-oem-slimbook-proxamd5
index 9830fc2..fe65b5b 100755
--- a/oem-prepare/usr/sbin/calamares-oem-slimbook-proxamd5
+++ b/oem-prepare/usr/sbin/calamares-oem-slimbook-proxamd5
@@ -6,12 +6,12 @@
 
 set -ex
 
-if [ "$(dmidecode --string system-manufacturer)" != "SLIMBOOK" ]; then
+if [ "$(pkexec dmidecode --string system-manufacturer)" != "SLIMBOOK" ]; then
   echo "I: Not SLIMBOOK"
   exit 0
 fi
 
-if [ "$(dmidecode --string system-product-name)" != "PROX-AMD5" ]; then
+if [ "$(pkexec dmidecode --string system-product-name)" != "PROX-AMD5" ]; then
   echo "I: Not PROX-AMD5"
   exit 0
 fi


More information about the Neon-commits mailing list