mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2023-10-10 13:36:59 +02:00
Fix: multiple users returned by 'who'.
Grep being greedy causes an invalid FOUND_USER string be created, thus system service is created correctly.
This commit is contained in:
parent
4fc745e748
commit
763345969b
@ -29,7 +29,7 @@ BOOT_BERRYBOOT=$(grep -m1 -c '\(/var/media\|/media/pi\)/berryboot' /etc/mtab)
|
|||||||
NET_IP=`hostname -I | cut -d " " -f1`
|
NET_IP=`hostname -I | cut -d " " -f1`
|
||||||
|
|
||||||
# search for users in system, returns first entry
|
# 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
|
# determine if we should use a service
|
||||||
ENABLE_SERVICE=0
|
ENABLE_SERVICE=0
|
||||||
|
Loading…
Reference in New Issue
Block a user