slitaz-boot-scripts rev 457 tip

Remove cat process
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun Oct 20 12:13:09 2019 +0200 (7 weeks ago)
parents 903ebc4acdcd
children
files etc/init.d/bootopts.sh
line diff
     1.1 --- a/etc/init.d/bootopts.sh	Sat Mar 30 10:10:52 2019 -0400
     1.2 +++ b/etc/init.d/bootopts.sh	Sun Oct 20 12:13:09 2019 +0200
     1.3 @@ -23,7 +23,7 @@
     1.4  # This option is not handled by a loop and case like others and has no
     1.5  # effect on an installed system.
     1.6  if fgrep -q 'user=' /proc/cmdline; then
     1.7 -	USER=$(cat /proc/cmdline | sed 's/.*user=\([^ ]*\).*/\1/')
     1.8 +	USER=$(sed 's/.*user=\([^ ]*\).*/\1/' /proc/cmdline)
     1.9  	# Avoid usage of an existing system user or root.
    1.10  	if grep -q ^$USER /etc/passwd; then
    1.11  		USER=tux
    1.12 @@ -111,7 +111,7 @@
    1.13  				sleep $USBDELAY
    1.14  			fi
    1.15  
    1.16 -			USER=$(cat /etc/passwd | sed '/:1000:/!d;s/:.*//;q')
    1.17 +			USER=$(sed '/:1000:/!d;s/:.*//;q' /etc/passwd)
    1.18  			DEVID=$DEVICE
    1.19  			if [ -x /sbin/blkid ]; then
    1.20  				# Can be a label, uuid, type or devname. DEVID gives us first: /dev/name.