slitaz-boot-scripts rev 258

bootopts.sh: remove user confug it's now in user-home.sh
author Christophe Lincoln <pankso@slitaz.org>
date Fri Apr 29 21:06:53 2011 +0200 (2011-04-29)
parents 63eaa6ed9233
children da846b200fe8
files etc/init.d/bootopts.sh
line diff
     1.1 --- a/etc/init.d/bootopts.sh	Fri Apr 29 18:24:31 2011 +0200
     1.2 +++ b/etc/init.d/bootopts.sh	Fri Apr 29 21:06:53 2011 +0200
     1.3 @@ -13,39 +13,6 @@
     1.4  EOT
     1.5  }
     1.6  
     1.7 -# Default user account without password (uid=1000). In live mode the option
     1.8 -# user=name can be used, but user must be added before home= to have home dir.
     1.9 -# This option is not handled by a loop and case like others and has no
    1.10 -# effect on an installed system.
    1.11 -if ! grep -q "100[0-9]:100[0-9]" /etc/passwd; then
    1.12 -	if grep -q "user=" /proc/cmdline; then
    1.13 -		USER=`cat /proc/cmdline | sed 's/.*user=\([^ ]*\).*/\1/'`
    1.14 -		# Avoid usage of an existing system user or root.
    1.15 -		if grep -q ^$USER /etc/passwd; then
    1.16 -			USER=tux
    1.17 -		fi
    1.18 -	else
    1.19 -		USER=tux
    1.20 -	fi
    1.21 -	echo -n "Configuring user and group: $USER..."
    1.22 -	adduser -D -s /bin/sh -g "SliTaz User" -G users -h /home/$USER $USER
    1.23 -	passwd -d $USER >/dev/null
    1.24 -	status
    1.25 -	# Audio and cdrom group.
    1.26 -	addgroup $USER audio
    1.27 -	addgroup $USER cdrom
    1.28 -	addgroup $USER video
    1.29 -	addgroup $USER tty
    1.30 -	# /home/$USER files from /etc/skel.
    1.31 -	# make user be only read/write by user
    1.32 -	chmod -R 700 /home/$USER
    1.33 -	# Slim default user.
    1.34 -	if [ -f /etc/slim.conf ]; then
    1.35 -		sed -i s/"default_user .*"/"default_user        $USER"/\
    1.36 -			/etc/slim.conf
    1.37 -	fi
    1.38 -fi
    1.39 -
    1.40  # Parse /proc/cmdline for boot options.
    1.41  echo "Parsing kernel cmdline for SliTaz live options... "
    1.42