From 763345969b2a843131b75dd0fc16febe23814de6 Mon Sep 17 00:00:00 2001 From: Ben Nealon Date: Wed, 7 Aug 2019 14:39:18 +0100 Subject: [PATCH] Fix: multiple users returned by 'who'. Grep being greedy causes an invalid FOUND_USER string be created, thus system service is created correctly. --- cmake/debian/postinst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/debian/postinst b/cmake/debian/postinst index eb9fa7ec..9c090cf1 100644 --- a/cmake/debian/postinst +++ b/cmake/debian/postinst @@ -29,7 +29,7 @@ BOOT_BERRYBOOT=$(grep -m1 -c '\(/var/media\|/media/pi\)/berryboot' /etc/mtab) NET_IP=`hostname -I | cut -d " " -f1` # search for users in system, returns first entry -FOUND_USR=`who | grep -o '^\w*\b'` || "root" +FOUND_USR=`who | grep -o -m1 '^\w*\b'` || "root" # determine if we should use a service ENABLE_SERVICE=0