slitaz-dev-tools rev 264

tazu: add --edit option
author Christophe Lincoln <pankso@slitaz.org>
date Mon Dec 12 20:43:21 2016 +0100 (2016-12-12)
parents e2eaf966072e
children 6f82a9600893
files tazu/tazu
line diff
     1.1 --- a/tazu/tazu	Mon Dec 12 19:56:25 2016 +0100
     1.2 +++ b/tazu/tazu	Mon Dec 12 20:43:21 2016 +0100
     1.3 @@ -31,6 +31,7 @@
     1.4  
     1.5  Options:
     1.6    --admin  Make user admin
     1.7 +  --edit   Edit user account.conf
     1.8    --del    Delete a user account
     1.9  
    1.10  EOT
    1.11 @@ -41,7 +42,7 @@
    1.12  }
    1.13  
    1.14  deluser() {
    1.15 -	if [ -d ]; then
    1.16 +	if [ -d "${people}/${user}" ]; then
    1.17  		rm -rf "${people}/${user}"
    1.18  	fi
    1.19  	sed -i "/^${user}:/"d $authfile
    1.20 @@ -123,6 +124,14 @@
    1.21  					status
    1.22  				fi ;;
    1.23  			
    1.24 +			*\ --edit\ *)
    1.25 +				# Edit a user account
    1.26 +				if [ -f "${people}/${user}/account.conf" ]; then 
    1.27 +					nano ${people}/${user}/account.conf
    1.28 +				else
    1.29 +					no_account
    1.30 +				fi ;;
    1.31 +			
    1.32  			*\ --del\ *)
    1.33  				# Delete a user
    1.34  				if [ -d "${people}/${user}" ]; then